Description Usage Arguments Value Examples
Produces quantiles of the variables.
quantiles
shows quantile values.
Efficient with big data: if you give it a data.table
,
quantiles
uses data.table
syntax.
1 |
df |
A data.table, tibble, or data.frame. |
... |
A column or set of columns (without quotation marks). |
probs |
numeric vector of probabilities with values in [0,1]. |
na.rm |
logical; if true, any NA and NaN's are removed from x before the quantiles are computed. |
Quantile values.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # data.table
library(data.table)
library(magrittr)
a <- data.table(varname = sample.int(20, size = 1000000, replace = TRUE))
a %>% quantiles(varname)
# data.table: look at top 10% in more detail
a %>% quantiles(varname, probs = seq(0.9, 1, 0.01))
# tibble
library(dplyr)
b <- tibble(varname = sample.int(20, size = 1000000, replace = TRUE))
b %>% quantiles(varname, na.rm = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.