Re: [R] column names of a correlation matrix

2009-10-29 Thread Lee William
Thanks! guys for the help. cheers! Lee On Wed, Oct 28, 2009 at 7:03 PM, Tony Plate wrote: > Here's a simple example that might help you get what you want: > > set.seed(1) >> x <- matrix(rnorm(30), ncol=3, dimnames=list(NULL, letters[1:3])) >> (xc <- cor(x)) >> > a b

Re: [R] column names of a correlation matrix

2009-10-28 Thread Tony Plate
Here's a simple example that might help you get what you want: set.seed(1) x <- matrix(rnorm(30), ncol=3, dimnames=list(NULL, letters[1:3])) (xc <- cor(x)) a b c a 1.000 -0.3767034 -0.7158385 b -0.3767034 1.000 0.6040273 c -0.7158385 0.6040273 1.000

Re: [R] column names of a correlation matrix

2009-10-27 Thread David Winsemius
On Oct 27, 2009, at 10:54 AM, Lee William wrote: Hi! All, I am working on a correlation matrix of 4217x4217 named 'cor_expN'. I wish to obtain pairs with highest correlation values. So, I did this b=matrix(data=NA,nrow=4217,ncol=1) rownames(b)=rownames(cor_expN) for(i in 1:4217){b[i,]=max(c

[R] column names of a correlation matrix

2009-10-27 Thread Lee William
Hi! All, I am working on a correlation matrix of 4217x4217 named 'cor_expN'. I wish to obtain pairs with highest correlation values. So, I did this > b=matrix(data=NA,nrow=4217,ncol=1) > rownames(b)=rownames(cor_expN) > for(i in 1:4217){b[i,]=max(cor_expN[i,])} > head(b) [,1] aae