Description Usage Arguments Value See Also Examples
View source: R/divide_by_quantile.R
Creates a factor based on equally spaced quantiles of a variable.
1 | divide_by_quantile(data, n, na.rm = TRUE)
|
data |
A numeric vector. |
n |
An integer specifying the number of levels in the factor to be created. |
na.rm |
A logical vector indicating whether the |
A vector of class factor
indicating in which quantile the
element in data
belongs.
1 2 | x <- c(sample(1:20, 9), NA)
divide_by_quantile(x, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.