我有一个 4049x30 的数据集,每个单元格都有一个数字或 NA。我需要计算每行特定数字出现的次数。IE
m<-matrix(c(1, 2, 3, 1, 5, 6, 3, 5, 6, 2, 3, 7), ncol=3, byrow = TRUE)
我有 (2,3) 两次和 (5,6) 两次
非常感谢你的帮助
algorithm counter r matrix
algorithm ×1
counter ×1
matrix ×1
r ×1