cv {inTextSummaryTable}R Documentation

Compute the percentage coefficient of variation, (in a scale from 0 to 100).

Description

The coefficient of variation is computed as: \frac{\sigma(x)}{\bar{x}}*100, with:

Usage

cv(x, na.rm = FALSE)

Arguments

x

Numeric vector.

na.rm

Logical, should NA value(s) be removed (FALSE by default)?

Value

Numeric vector of length 1 with coefficient of variation.

Author(s)

Laure Cougnaud

See Also

Other stats utility functions: geomCV(), geomMean(), geomSD(), geomSE(), se()

Examples

# coefficient of variation of normal distribution tends to 100%
cv(rnorm(n = 1000, mean = 1, sd = 1))

[Package inTextSummaryTable version 3.3.3 Index]