Re: [R] compute pearson correlation p-values for all combinations of columns of 2 matrices

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Tue, 25 Nov 2008 09:50:33 -0500

Didn't this question get asked and answered within a week or two?

Daren Tan, .... meet John Baron's help search page: http://search.r-project.org/

( .... and it apparently gets repeatedly asked and answered over the years.)

-- 
David Winsemius

On Nov 25, 2008, at 7:14 AM, Daren Tan wrote:


>
> How can I compute the pearson correlation p-values for all
> combinations of columns of 2 matrices ?
>
>
>> m <- matrix(rnorm(20), nrow=4, dimnames=list(LETTERS[1:4],
>> letters[1:5]))
>> m1 <- matrix(rnorm(20), nrow=4, dimnames=list(LETTERS[1:4],
>> letters[1:5]))
>> cor(m,m1)
> a b c d e
> a -0.67533294 -0.2516151 -0.3780815 0.55816011 -0.16526501
> b 0.41729336 0.1078082 0.6671405 -0.81381931 -0.20240428
> c -0.01058068 -0.5069489 0.7723080 -0.79558376 -0.32441411
> d 0.98691269 0.8147252 -0.2853724 0.05879335 0.63893235
> e 0.59140305 0.6746471 0.2835064 -0.47762034 -0.06372043
>
> ______________________________________________
> R-help_at_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.
______________________________________________ R-help_at_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.
Received on Tue 25 Nov 2008 - 14:52:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 25 Nov 2008 - 15:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive