Entering edit mode
7.8 years ago
Edalat
▴
30
I´m building a correlation between two different matrices(coding-lncoding) with rcorr() function in R,how can I remove within table correlations?is there any way or I should remove them by hand?
What specifically do you call within table correlation?
see this table that made by another person:
table1 <- matrix(rnorm(25),5)
table2 <- matrix(rnorm(25),5)
res <- rcorr(table1, table2, type="pearson") res
Notice the upper right quadrant of rcorr() (which repeats diagonally symmetrical on lower left) is the entire result of cor() (rounded to two decimal points)
res <- cor(table1, table2, method="pearson")
res
I want the correlation like core result,I need p-value so I used rcorr() function.