阅读背景:

如何将具有最高频率的类分配给R中data.frame的每一行?

来源:互联网 

i have the following table:

我有下表:

mymatrix <- matrix(c(34,11,65,32,12,9,32,90,21,51,45,23), ncol=3)
colnames(mymatrix) <- c("pos", "neg", "neutr") # class
rownames(mymatrix) <- c("1 -1 0", "-1 -1 0", "0 -1 1", "0 0 1") # patterns
mytable <- as.table(mymatrix)
mytable

#         pos neg neutr
# 1 -1 0   34  12    21
# -1 -1 0  11   9    51
# 0 -1 1   65  32    45
# 0 0 1    32  90    23
mymatrix 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: