小编elm*_*lue的帖子

table() 有没有有效的替代方法?

我使用以下命令:

table(factor("list",levels=1:"n")
Run Code Online (Sandbox Code Playgroud)

使用 "list": (example) a = c(1,3,4,4,3) and levels = 1:5,还要考虑 2 和 5。对于非常大的数据集,我的代码似乎非常无效。

有没有人知道隐藏的库或代码片段以使其更快?

performance r count tabulate

11
推荐指数
6
解决办法
852
查看次数

标签 统计

count ×1

performance ×1

r ×1

tabulate ×1