Src=as.factor(c("nc","us","us","nc","nc","ci","nn","pr","nc","nc","ak","ak","ak","ak","ci","hv","ak","ci","nc","nc"))
Version = as.factor(c(0,4,7,0,0,0,9,0,0,0,1,1,1,1,0,2,1,0,0,0))
table(Src,Version)
输出:
Version
Src 0 1 2 4 7 9
ak 0 5 0 0 0 0
ci 3 0 0 0 0 0
hv 0 0 1 0 0 0
nc 7 0 0 0 0 0
nn 0 0 0 0 0 1
pr 1 0 0 0 0 0
us 0 0 0 1 1 0
我可以显示相对频率,而不是显示计数的数字吗?