quant.cut {questionr} | R Documentation |
Transform a quantitative variable into a qualitative variable
Description
This function transforms a quantitative variable into a qualitative one by breaking it into classes with the same frequencies.
Usage
quant.cut(var, nbclass, include.lowest = TRUE, right = FALSE, dig.lab = 5, ...)
Arguments
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 |
Details
This is just a simple wrapper around the cut
and quantile
functions.
Value
The result is a factor.
See Also
Examples
data(iris)
sepal.width3cl <- quant.cut(iris$Sepal.Width,3)
table(sepal.width3cl)
[Package questionr version 0.7.8 Index]