R语言中统计频数

时间:2021-04-19 15:48:06   收藏:0   阅读:0

 

1、

> a <- c(2,3,4,2,3,4,2,2,4)
> b <- as.data.frame(table(a))
> b
  a Freq
1 2    4
2 3    2
3 4    3

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!