Re: [R] correlatation matrix

2011-05-31 Thread Prof Brian Ripley
See ?cor for an efficient vectorized way to find the correlation matrix. You could compute p-values from the matrix (read the code for stats:::cor.test.default for the formulae), but note that with 169x20043 p-values, they don't really have much meaning. On Tue, 31 May 2011, Unger, Kristian,

Re: [R] correlatation matrix

2011-05-31 Thread Peter Langfelder
The WGCNA package contains function corAndPvalue that will calculate the correlation and the associated p-values for two matrices more efficiently and quickly. HTH, Peter On Tue, May 31, 2011 at 12:03 AM, Unger, Kristian, Dr. wrote: > Hi there, > > I wonder if there is a way of efficiently gene

[R] correlatation matrix

2011-05-31 Thread Unger, Kristian, Dr.
Hi there, I wonder if there is a way of efficiently generating a correlation matrix of two expression matrices. I want to correlate miRNA and mRNA expression and used the following code: ##dat.mi miRNA expression matrix, dat.m mRNA expression matrix nc <- nrow(dat.mi) cor.mat <- data.frame(rep(N