Re: [R] Help with loops and how R stores data

2008-02-04 Thread Ted Harding
On 02-Feb-08 21:16:41, R-novice wrote: > > I am trying to make an array c(3,8) that contains the averages of what > is in another array c(9,8). I want to average rows 1:3, 4:6, 7:9 and > have a loop replace the generic 1:24 values in my array with the > average of the three rows. > > The probl

[R] Help with loops and how R stores data

2008-02-03 Thread R-novice
I am trying to make an array c(3,8) that contains the averages of what is in another array c(9,8). I want to average rows 1:3, 4:6, 7:9 and have a loop replace the generic 1:24 values in my array with the average of the three rows. The problem I am having is that R only replaces the last value