George Pipis shows off the cut function in R:
A very common task in data processing is the transformation of the numeric variables (continuous, discrete etc) to categorical by creating bins. For example, is quite ofter to convert the
age
to theage group
. Let’s see how we can easily do that in R.
Click through for the demo. H/T R-Bloggers