Displaying 1 result from an estimated 1 matches for "x_vals_mean_tmp".
2009 Mar 25
2
Grouping Numbers
Ugh...This should be very simple, but evidently I am not searching for the proper term.
Given the below:
val_size<-100000
x_vals<-rnorm(val_size)
I would like to group them according to the following
x_vals_mean_tmp[1]<-mean(x_vals[1:10])
x_vals_mean_tmp[2]<-mean(x_vals[11:20])
...
x_vals_mean_tmp[n]<-mean(x_vals[99991:100000])
Then,
I would like to group them according to the following
x_vals_mean_tmp[1]<-mean(x_vals[1:100])
x_vals_mean_tmp[2]<-mean(x_vals[101:200])
...
x_vals_mean_tmp[m]<...