Re: [R] processing a large matrix

2007-02-12 Thread Greg Snow
lthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Greg Snow > Sent: Monday, February 12, 2007 2:34 PM > To: andy1983; r-help@stat.math.ethz.ch > Subject: Re: [R] processing a large matrix &g

Re: [R] processing a large matrix

2007-02-12 Thread Greg Snow
eg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of andy1983 > Sent: Monday, February 12, 2007 1:55 PM > To: r-help@stat.math.ethz.ch &g

Re: [R] processing a large matrix

2007-02-12 Thread Charles C. Berry
On Mon, 12 Feb 2007, andy1983 wrote: > > I would like to compare every column in my matrix with every other column and > get the r-squared. > > I tried using the following formula and looping through every column: >> summary(lm(matrix[,x]~matrix[,y]))$r.squared > If I have 10,000 columns, the loop

[R] processing a large matrix

2007-02-12 Thread andy1983
I would like to compare every column in my matrix with every other column and get the r-squared. I tried using the following formula and looping through every column: > summary(lm(matrix[,x]~matrix[,y]))$r.squared If I have 10,000 columns, the loops (10,000 * 10,000) take forever even if there is