Skip to content
Prev 320381 / 398502 Next

Averaging Out many rows from a column AND funtion to string

Hi
Make an index variable and aggregate values according it

Something like
idx<-cut(1:153899, 153)
keep.ag<-aggregate(keep, list(idx), mean)
I am not sure if I understand correctly. 

Is this what you want?
myf <-function(fun="mean", arg) eval(call(fun, arg))

Regards
Petr