I have to big data frames for genomic analysis. Each of these data frames has 500k rows and 100 columns. Those 100 columns represent measurements for each gene. What I want to do is calculating the Spearman's correlation coefficient for each gene across all 100 values in both data farms. Example:
df1
genename x1 x2 x3 ..............x100
gene1 0.236 0.589 0.896 0.789
gene2 -0.361 0.782 0.583 0.478
df2
genename x1 x2 x3 ...............x100
gene1 0.101 0.256 0.026 0.0.56
gene2 -0.231 0.569 0.158 0.0223
What I want here for example is to find all correlation coefficients for gene1 across all 100 obs. That means I should have 100 correlation coff for each gene
cor, however the p-values it is more complicated. For that you can use other functions likercorr(Hmisc package) orcorr.test( psych package). Some information: sthda.com/english/wiki/… - S Rivero