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