[R] caculate correlation

Elham - ed_isfahani at yahoo.com
Mon Jan 30 20:40:05 CET 2017


for calculating correlation between coding and noncoding,first I transposed data ,(rows become columns) so row is control&treatment and columns are gene names.(so I have 2 matrix with same row and different column),I use these function for calculating correlation but all of spearman correlation are NA,why?


control.corr=cor(coding.rpkm[grep("23.C",coding.rpkm$name),-1],ncoding.rpkm[grep("23.C",ncoding.rpkm$name),-1],method= "spearman")






 
tumor.corr=cor(coding.rpkm [grep("27.T", coding.rpkm $name),-1], ncoding.rpkm [grep("27.T", ncoding.rpkm $name),-1],method = "spearman")

	[[alternative HTML version deleted]]



More information about the R-help mailing list