推薦一個(gè)Hmisc包
下載好后使用#res=rcorr(as.matrix(rt))#這個(gè)函數(shù)可將rt列表中的任意兩個(gè)基因展示相關(guān)系數(shù)與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)
將數(shù)據(jù)以表格形式呈現(xiàn)