[R] Simple question on binning data

Erik Iverson eriki at ccbr.umn.edu
Thu May 13 22:51:06 CEST 2010


There would be several people who could help if you gave us a minimal, 
reproducible example like the posting guide asks for.

If you have a vector of continuous data, and need to create a 
categorical variable (in R, a factor) from that continuous variable, 
then ?cut can help you.



george5000 wrote:
> Hello everyone,
> 
> I have a data set, and I need to bin my data using a bin width of say g(n).
> Would anyone be willing to tell me how to do this in R?
> 
> Thanks



More information about the R-help mailing list