get_summ_stats: Helper function for 'mk_histogram'. Not for external use.

View source: R/get_summ_stats.R

get_summ_statsR Documentation

Helper function for mk_histogram. Not for external use.

Description

get_summ_stats takes in the original data frame, the x and group variables. It returns a data frame of the summary stats (median, mean and etc) of x in each group. Used to add lines at these summary stats for histograms.

Usage

get_summ_stats(df, xvar, facet_by)

Arguments

df

Original data frame.

xvar

String, name of a continuous variable for x-axis.

facet_by

String, name of a categorical variable for grouping x and creating a facet for each group.

Value

A data frame containing summary stats for each group.

See Also

mk_histogram.


gmlang/ezplot documentation built on Sept. 18, 2022, 6:33 a.m.