推荐一个Hmisc包
下载好后使用#res=rcorr(as.matrix(rt))#这个函数可将rt列表中的任意两个基因展示相关系数与P值
cormatrix=function(cor,p){
ut=upper.tri(cor)
data.farme(row=rownames((cor)[row(cor)[urt],]
colum=rownames(cor)[col(cor)[ut]],
cor=(cor)[ut],
p=p[ut]))
}
cormatrix(res$r,res$p)
将数据以表格形式呈现