练习R:factor函数为有序分类变量创建值标签
data$jobcat <- factor(data$jobcat,ordered = T,
levels = c("1","2","3"),
labels = c("pt","bg","jl")
)
赞 (0)
data$jobcat <- factor(data$jobcat,ordered = T,
levels = c("1","2","3"),
labels = c("pt","bg","jl")
)