| summarize_quants | R Documentation |
Calculate arbitrary quantiles for particular column(s) by group
and create a summary data.frame which holds a column for each
unique combination of values of columns (cols) and quantile
values (probs).
summarize_quants(
df = NULL,
grp_cols = NULL,
cols = NULL,
probs = c(0.05, 0.25, 0.5, 0.75, 0.95),
include_mean = TRUE,
check_args = TRUE
)
df |
A data.frame |
grp_cols |
A character vector of the column names to use for grouping the data |
cols |
A character vector representing column names on which to perform the calculations |
probs |
A vector of quantile probabilities to pass to stats::quantile |
include_mean |
If TRUE, include the mean in the output as the column
ending in |
check_args |
If |
Create a new data.frame which summarizes the one passed as df.
The summary data.frame will have a column for each grouping column
(grp_cols) and a set of columns for each column name (cols), where
the set of columns is one for each value of probs. New columns will
be compose of the name in cols, an underscore, and the value in probs.
A data.frame with a new column for each value in the probs
vector and a column for the mean in include_mean is TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.