On Wed, Nov 16, 2011 at 8:37 AM, muzz56 <musah...@gmail.com> wrote: > Dear All, > I am not familiar with R yet I want to use it to perform some task, hence my > posting here. I hope someone can help. > I have a set of data, genes (rows) and samples (columns). I want to do a > Pearson correlation on all the possible pairwise combinations of all the > genes (2000). Does anyone have an idea of how to execute this in R?
Put the expression data in a matrix called expression Then simply execute correlations = cor(t(expression)) If you have missing data, use correlations = cor(t(expression), use = 'p') HTH Peter ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.