summarySE | R Documentation |
Matrix summarization function adapted from http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)the R cookbook.
summarySE(
data = NULL,
measurevar,
groupvars = NULL,
na.rm = FALSE,
conf.interval = 0.95,
add_medians = FALSE,
.drop = TRUE
)
data |
A data frame. Expects all values for summarisation to be in one
column, which may requie judicious use of |
measurevar |
The name of a column that contains the variable to be summariezed |
groupvars |
A vector containing names of columns that contain grouping variables |
na.rm |
A boolean that indicates whether to ignore NA's |
conf.interval |
The percent range of the confidence interval (default is 95 percent) |
add_medians |
Logical indicating whether medians should be added to the output. Standard error estimates for the median require bootstrapping, so TRUE for this variables make summary statistic calculation take longer. |
.drop |
Logical passed to ddply() |
Uses bootstrapping to return the standard error/ deviation of the median.
out Data frame with summary statistics
tg <- ToothGrowth
summarySE(tg, measurevar = "len", groupvars = c("supp", "dose"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.