| descriptive_statistic | R Documentation |
Compute grouped mean ± SD and min–max summary statistics for one or more numeric variables.
descriptive_statistic(data, vars, groups, digits = 2)
data |
A data frame. |
vars |
<['tidy-select'][dplyr::dplyr_tidy_select]> Columns to summarise. |
groups |
<['tidy-select'][dplyr::dplyr_tidy_select]> Grouping columns. |
digits |
Number of decimal places to round to. Default is 2. |
A tibble with one row per group and two summary columns per variable ('<var>_mean_sd' and '<var>_min_max').
df <- data.frame(group = c("A","A","B","B"), value = c(1.1, 2.3, 3.5, 4.7))
descriptive_statistic(df, vars = value, groups = group)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.