How to get summary statistics by group

前端 未结 10 1476
渐次进展
渐次进展 2020-11-22 05:13

I\'m trying to get multiple summary statistics in R/S-PLUS grouped by categorical column in one shot. I found couple of functions, but all of them do one statistic per call,

10条回答
  •  天涯浪人
    2020-11-22 05:35

    While some of the other approaches work, this is pretty close to what you were doing and only uses base r. If you know the aggregate command this may be more intuitive.

    with( df , aggregate( dt , by=list(group) , FUN=summary)  )
    

提交回复
热议问题