dplyr equivalent to ddply in plyr diamonds example

前端 未结 2 1066
执笔经年
执笔经年 2021-01-12 22:32

ok, I\'m trying to wrap my head around dplyr, using it instead of plyr. In my short time with R I\'ve grown somewhat accustomed to ddply. I\'m using a \"simple\" example fo

2条回答
  •  难免孤独
    2021-01-12 22:57

    Thanks for the help. I like this answer. Not quite as compact as the original ddply command, but a heck of a lot more readable. (side note: answering a question is a pain, needs work)

        t3.table <- diamonds %>% group_by(clarity, cut) %>% summarise(nrow=n()) 
    

提交回复
热议问题