Re: [R] Correlation between 2 matrices but with subset of variables

2012-03-09 Thread A Ezhil
Dear Peter, Thank you very much. Best regards, Ezhil --- On Fri, 3/9/12, Petr Savicky wrote: > From: Petr Savicky > Subject: Re: [R] Correlation between 2 matrices but with subset of variables > To: r-help@r-project.org > Date: Friday, March 9, 2012, 1:18 PM > On Thu, Mar 08

Re: [R] Correlation between 2 matrices but with subset of variables

2012-03-08 Thread Petr Savicky
On Thu, Mar 08, 2012 at 03:57:06PM -0800, A Ezhil wrote: > Dear All, > I have two matrices A (40 x 732) and B (40 x 1230) and would like to > calculate correlation between them. ?I can use: cor(A,B, method="pearson") to > calculate correlation between all possible pairs. But the issue is that the

Re: [R] Correlation between 2 matrices but with subset of variables

2012-03-08 Thread chuck.01
Example data would be helpful A Ezhil wrote > > Dear All, > I have two matrices A (40 x 732) and B (40 x 1230) and would like to > calculate correlation between them.  I can use: cor(A,B, method="pearson") > to calculate correlation between all possible pairs. But the issue is that > there is

Re: [R] Correlation between 2 matrices but with subset of variables

2012-03-08 Thread A Ezhil
Thanks a lot, Michael.  --- On Fri, 3/9/12, R. Michael Weylandt wrote: From: R. Michael Weylandt Subject: Re: [R] Correlation between 2 matrices but with subset of variables To: "A Ezhil" Cc: r-help@r-project.org Date: Friday, March 9, 2012, 7:59 AM Well, it would be possi

Re: [R] Correlation between 2 matrices but with subset of variables

2012-03-08 Thread R. Michael Weylandt
Well, it would be possible to set something up to select out just the right pairs each time, but on my system the following a <- matrix(rnorm(40 * 732), 40) b <- matrix(rnorm(40 * 1230), 40) system.time(cor(a,b,method = "pearson")) takes about a tenth of a second so any more elective approach wi

[R] Correlation between 2 matrices but with subset of variables

2012-03-08 Thread A Ezhil
Dear All, I have two matrices A (40 x 732) and B (40 x 1230) and would like to calculate correlation between them.  I can use: cor(A,B, method="pearson") to calculate correlation between all possible pairs. But the issue is that there is one-many specific mappings between A and B and I just need