Sort data frame column by factor

后端 未结 4 2577
自闭症患者
自闭症患者 2020-12-06 00:43

Supose I have a data frame with 3 columns (name, y, sex) where name is character, y is a numeric value and <

4条回答
  •  -上瘾入骨i
    2020-12-06 01:26

    I think there must be some function like it to apply on data frames and get data frames as return

    Yes there is:

    library(plyr)
    
    ddply(score, c('y', 'sex'))
    

提交回复
热议问题