sum_stats: For calculating summary statistics on a vector.

Description Usage Arguments Details Value Author(s)

View source: R/sum_stats.R

Description

Calculates arithmetic and geometric summary statistics for an input vector.

Usage

1
sum_stats(data, pct = c(5, 95))

Arguments

data

numeric vector to compute summary statistics on.

pct

defaults to c(5, 95). Up to 3 different percentiles can be calculated. For example:

sum_stats(data, pct = c(5, 50, 95)).

If percentiles are not required then set:

pct = NA.

Details

Vector of summary statistics contains the following:

n

number of elements.

n_NA

number of NA elements.

min

minimum value.

max

maximum value.

median

median value.

arith_mean

arithmetic mean value.

std_dev

standard deviation.

arith_CV

arithmetic coefficient of variation.

geo_mean

geometric mean value.

geo_std_dev

geometric standard deviation.

geo_CV

geometric coefficient of variation.

Value

A vector of named elements (see Details).

Author(s)

Rupert Austin


jgrevel/BAST1-R-Library documentation built on May 21, 2019, 10:11 a.m.