ds: Descriptive statistics

Description Usage Arguments See Also Examples

Description

A wrapper for dplyr's group_by and summarise for descriptive statistics.

Usage

1
ds(.data, formula, funs = c("mean", "se"), names = funs, ...)

Arguments

.data

a data frame containing the variables in the formula formula.

formula

a formula in the form lhs ~ rhs where lhs is a numeric variable giving the data values and rhs one or more factors with two or more levels giving the corresponding groups or . if the parameters should be calculated over all cases.

funs

character vector with function names indicating the parameters to calculate (default: c("mean", "se")).

names

character vector with variable names for output data frame, defaults to funs.

...

further arguments passed to funs, e.g. na.rm

See Also

aggregate

Examples

1
2
3
4
ds(sleep, extra ~ group)
ds(sleep, extra ~ group, funs = c("median", "var", "n"))

ds(hquest, trait_anx ~ group + gender)

dgromer/psymisc documentation built on May 15, 2019, 7:22 a.m.