Description Usage Arguments Value Examples
Convert Numeric to Quantile-Split Factor
1 2 | cutQuantile(x, quantiles, labels = paste(1:quantiles), na.rm = FALSE,
type = 7)
|
x |
Numeric vector which is to be converted to a factor by splitting into quantiles. |
quantiles |
Integer number of quantiles desired (3 = tertiles, 4 = quartiles, etc.). |
labels |
Character vector of labels for the levels of the resulting category. By default, labels are constructed by converting the quantile integer codes to a character vector. If labels = FALSE, simple integer codes are returned instead of a factor. |
na.rm |
Logical, if |
A factor
is returned, unless labels = FALSE
which results in an integer vector of level codes.
1 | table(cutQuantile(1:100, 4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.