summarySE: summarySE

Description Usage Arguments Value Author(s) Examples

View source: R/RFunctions.R

Description

Takes in a data.frame, and returns summary statistics for the specified measurevar by groupvars.

Usage

1
2
summarySE(data = NULL, measurevar, groupvars = NULL, na.rm = TRUE,
  conf.interval = 0.95, .drop = TRUE)

Arguments

data

A data.frame.

measurevar

Character. The name of the variable to summarize.

groupvars

Character vector. Name of the grouping variables to summarize by.

na.rm

Logical. Remove NA values before summarizing?

conf.interval

Numeric. What percentile to use for confidence interval?

.drop

Logical. Drop unused levels of the grouping variables.

Value

A data.frame.

Author(s)

Caspar J. van Lissa

Examples

1
2
3
dat <- iris
dat$Long <- cut(dat$Petal.Length, 2)
summarySE(dat, "Sepal.Length", c("Species", "Long"))

cjvanlissa/motley documentation built on Sept. 23, 2019, 7:39 p.m.