get_custom_summary_stats | R Documentation |
The get_custom_summary_stats()
function computes a set of summary statistics
(e.g., count, mean, standard deviation, interquartile range, median, skewness, and kurtosis)
for one or more variables in a given data frame. Users can optionally specify which statistics
to display.
get_custom_summary_stats(df, ..., show = NULL)
df |
A |
... |
One or more variable names (unquoted or quoted) for which the summary statistics will be computed. |
show |
A character vector specifying which summary statistics to include in the output.
Possible values are |
This function uses dplyr::across()
to apply multiple summary functions dynamically
to the specified variables. Summary statistics are computed using base R and
the moments
package for skewness and kurtosis. The resulting summary statistics
are named dynamically as <variable>_<statistic>
.
A tibble
containing the computed summary statistics. Each statistic is presented
as a column with names formatted as <variable>_<statistic>
.
get_custom_summary_stats(iris, Sepal.Length, show = c("mean", "sd"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.