summary2: Descriptive summary with SD/SE + improved formatting

View source: R/NCmisc.R

summary2R Documentation

Descriptive summary with SD/SE + improved formatting

Description

Wrapper for the base function summary() but adds standard deviation, standard error, and an 'N' and missing 'NA' count that are consistent.

Usage

summary2(x, digits = NULL, neaten.names = TRUE)

Arguments

x

vector of numeric data

digits

number of digits to round resulting values to

neaten.names

logical, TRUE removes period and space from names of the results returned by summary() to make the names better for use in a data.frame.

Value

array of descriptive statistics for x

Author(s)

Nicholas Cooper njcooper@gmx.co.uk

Examples

x <- 1:100
summary2(x, digits=2)
summary2(c(x, NA, NA), digits=2)

NCmisc documentation built on Oct. 17, 2022, 5:09 p.m.