[R] Simple question on binning data

Carl Witthoft carl at witthoft.com
Thu May 13 23:31:27 CEST 2010


It's very simple to write a "binit()" function.  If all you want to do 
is e.g., bin 107 values into sums of 10 at a time, then write a loop 
that sums x[10*i:11*i-1]  (not tested and not syntactically correct).

The one I wrote for myself discards any partial bin (101-107 in my 
example) and leaves a warning note that this took place.

Carl



More information about the R-help mailing list