R语言中将矩阵转化为行列的形式 1、创建测试矩阵 > rname <- paste0("r",1:4)>rname [1]"r1""r2""r3""r4"> cname <- paste0("c",1:5)>cname [1]"c1""c2""c3""c4""c5"> a <- matrix(1:20, nrow =4, ncol =5, byrow =T,+ dimnames =list(rname,cname))>a c1 c2 c3 c4 ...