Thanks Peter. I tried this after reading in the csv (read.csv) and
converted the data to matrix (as.matrix). But when I tried the correlation,
I keeping getting the error (x must be numeric) yet when I view the data,
its numeric.

On 16 November 2011 14:32, plangfelder [via R] <
ml-node+s789695n4077593h30@n4.nabble.com> wrote:

> On Wed, Nov 16, 2011 at 8:37 AM, muzz56 <[hidden email]<http://user/SendEmail.jtp?type=node&node=4077593&i=0>>
> 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
>
> ______________________________________________
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4077593&i=1>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.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
> http://r.789695.n4.nabble.com/Pairwise-correlation-tp4076963p4077593.html
>  To unsubscribe from Pairwise correlation, click here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4076963&code=bXVzYWhhc3NAZ21haWwuY29tfDQwNzY5NjN8LTE5ODYxNDM0OTI=>
> .
> NAML<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: http://r.789695.n4.nabble.com/Pairwise-correlation-tp4076963p4077773.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]

