get_sum_stats: Calculate summary statistics

Description Usage Arguments Value Examples

View source: R/get_sum_stats.R

Description

Calculate summary statistics

Usage

1
2
3
4
5
6
7
get_sum_stats(
  df,
  sum_vars,
  group_vars = NULL,
  sum_funcs = list(mean = base::mean, sd = stats::sd, median = stats::median, iqr =
    stats::IQR)
)

Arguments

df

a data.frame object.

sum_vars

character() vector with name of columns to summarize.

group_vars

character() vector with name of columns to group_by()

sum_funcs

either function or list of functions. By default, uses base::mean(), stats::sd(), stats::median(), stats::IQR().

Value

tibble object containing summarized data.

Examples

1
2
3
4
5
6
iris_summary <-
    get_sum_stats(
        iris,
        sum_vars = "Sepal.Length",
        group_vars = "Species"
    )

dzhang32/rutils documentation built on April 2, 2021, 7:31 p.m.