quant.cut | R Documentation |
This function transforms a quantitative variable into a qualitative one by breaking it into classes with the same frequencies.
quant.cut(var, nbclass, include.lowest = TRUE, right = FALSE, dig.lab = 5, ...)
var |
variable to transform |
nbclass |
number of classes |
include.lowest |
argument passed to the |
right |
argument passed to the |
dig.lab |
argument passed to the |
... |
arguments passed to the |
This is just a simple wrapper around the cut
and quantile
functions.
The result is a factor.
cut
, quantile
data(iris) sepal.width3cl <- quant.cut(iris$Sepal.Width,3) table(sepal.width3cl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.