sumStats: Summary Statistics

Description Usage Arguments Value

Description

Provides summary statistics (mean, sd, quartiles, IQR, missing n, valid n) for the variables in a data frame.

Usage

1
sumStats(data, vars, byvar = NULL, convertFactors = TRUE)

Arguments

data

A data frame from which variables will be extracted.

vars

A character vector of variable names.

byvar

A character string giving a variable name of a stratifying variable. The summaries of the vars will be provided for each level of byvar.

convertFactors

Logical indicating whether factors should be converted to numeric first and then summarised.

Value

a vector of summary statistics for each variable or variable-group combination.


DAMisc documentation built on Jan. 12, 2022, 1:07 a.m.