gene_exp_matrix=as.matrix(gene_exp_matrix) 可以强行将其转化为矩阵格式
原始数据没问题
gene_exp_matrix <- apply(exp_matrix,2,function(x)tapply(x,geneidfactor,mean))
rownames(gene_exp_matrix)<-levels(geneidfactor)
输出的gene_exp_matrix 为value,不是data,导致
“Error in `rownames<-`(`*tmp*`, value = c("1", "2", "3", "9", "10", "12", :
不能给没有维度的对象设'rownames'
求大神解决