How can I create the below factor variable using the functions from the forcats package instead of base R?
ChickWeight2 <- mutate(ChickWeight2, weight5_2 = factor(weight5, levels = c(1, 2, 3, 4, 5), labels = c("very little", "litle", "medium","big","very big"), ordered = TRUE)) https://stackoverflow.com/questions/65930471/using-the-forcats-package-instead-of-base-r January 28, 2021 at 11:06AM
没有评论:
发表评论