iqr: Numerical Summary Functions

View source: R/summary_functions.R

iqrR Documentation

Numerical Summary Functions

Description

A set of functions to calculate numerical summaries. The functions set na.rm = TRUE by default and will print a warning when data contains missing values, (NAs).

Usage

iqr(x, ...)

IQR(x, ...)

SAD(x, ...)

MAD(x, ..., na.rm = TRUE)

max(x, ...)

mean(x, ...)

median(x, ...)

min(x, ...)

prod(x, ...)

quantile(x, ...)

range(x, ...)

sd(x, ...)

sum(x, ...)

var(x, ...)

cor(x, y = NULL, ..., data = NULL)

Arguments

x

A vector of values or a formula. Formulas should be of the form ~ x | z where x is a numeric variable and z is a categorical variable. If a formula is supplied, the data argument must also be supplied.

data

A data set where variables supplied to the formula, ~ x | z, can be found.

Examples

data(cdc)
mean(1:10)
mean(~height, data = cdc)
mean(~height | gender, data = cdc)
MAD(1:10)
MAD(~height, data = cdc)
MAD(~height | gender, data = cdc)
quantile(~height, data = cdc)
quantile(~height, data = cdc, probs = 0.6)


mobilizingcs/mobilizr documentation built on Feb. 17, 2024, 7:49 p.m.