cut_quantile | R Documentation |
This function transforms a numeric vector into a factor corresponding to the quantile intervals. The intervals are left-open and right-closed.
cut_quantile(x, percentiles = c(1/3, 2/3), digits = 0)
x |
( |
percentiles |
( |
digits |
( |
The factor with a description of the available quantiles as levels.
set.seed(452)
x <- runif(10, -10, 10)
cut_quantile(x, c(0.33333333, 0.6666666), digits = 4)
x[1:4] <- NA
cut_quantile(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.