[R] Binning continuous data
Faryabi, Robert (NIH/NCI) [F]
Babak.Faryabi at nih.gov
Wed Feb 29 23:01:54 CET 2012
Hi there,
Here is the scenario:
I have a measurement of some sort for two variables, I would like to figure out a rough pattern between them. Let say if the values of the first variable are low, middle, high, and extremely high, then what would be the corresponding pattern of the second variable. The idea is not to find the 2d distribution, but plot a conditional distribution of the second variable based on the binning of the the first variable and then present it in a boxplot.
I got the breakpoints for binning the first variables by a bi-modal density estimation. Now I need to bin the first variable accordingly and map them to a categorical value.
Is there an R command that does the binning?
Thanks,
Robert
More information about the R-help
mailing list