Re: [R] Stats package

About this list Date view Thread view Subject view Author view Attachment view

From: Sean Davis (sdavis2@mail.nih.gov)
Date: Thu 27 May 2004 - 20:48:07 EST


Message-id: <BCDB3FA7.8562%sdavis2@mail.nih.gov>

Jason,

If you have a matrix m, you can take

cor(t(m))

Where t is the transpose operator.

Sean

On 5/27/04 6:34 AM, "Jason Skelton" <jps@sanger.ac.uk> wrote:

>
> Hi
>
> The cor function in the stats package calculates the correlation between
> columns of data, does anyone know if it is at all possible to calculate
> the correlation between rows instead ?
> Or is there an appropriate package or function that is more appropriate
> I'd like to calculate spearman & pearson correlations between rows.
>
> Many thanks
>
> Jason
>
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:13 EST