summary_se | R Documentation |
This function will take an input data.frame
and summarize a specified numeric column. The summary will include mean, standard error, and a confidence interval corresponding to the width specified (see ".ci" argument). The function leverages tidy eval internally and can accommodate bare column names.
summary_se(.data, measure_var, ..., .ci = 0.95, na.rm = TRUE)
.data |
A |
measure_var |
Bare column name for variable to summarize |
... |
Optional bare column names for grouping variables |
.ci |
Width of confidence interval; default is |
na.rm |
Boolean indicating whether or not to use the |
The inspiration for this function was Winston Chang's summarySE()
function from "The Cookbook for R". As mentioned in that text, this method of computing standard error is only appropriate for between group variation. If there is within subject variation (repeated measures) use another method (see references below).
Tibble with columns for grouping variables (if any) and summarized values for mean ("mean"), standard error ("se"), and confidence interval ("ci").
http://www.cookbook-r.com/Manipulating_data/Summarizing_data/
http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/#error-bars-for-within-subjects-variables
summary_se(.data = ToothGrowth, measure_var = len, supp, dose)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.