Re: [R] error on my loop function

2011-07-16 Thread Weidong Gu
Hi, In your loop, change Corrs[i] to Corrs[i,] Weidong Gu On Sat, Jul 16, 2011 at 12:02 PM, EdBo wrote: >> t > Hi > > I have to matrices t and y below. I want correlation of columns (a,d) (b,e) > and (c,f). The correlation should be for the first 3 rows of  matrix t > against matrix y; and the

[R] error on my loop function

2011-07-16 Thread EdBo
> t Hi I have to matrices t and y below. I want correlation of columns (a,d) (b,e) and (c,f). The correlation should be for the first 3 rows of matrix t against matrix y; and then the last 3 i.e a loop function. I have a code I created below but its giving me an error, surprisingly the the indiv