View source: R/stats-utility.R
cv | R Documentation |
The coefficient of variation is computed as:
\frac{\sigma(x)}{\bar{x}}*100
, with:
\sigma(x)
: standard deviation of x
\bar{x}
: arithmetic mean of x
cv(x, na.rm = FALSE)
x |
Numeric vector. |
na.rm |
Logical, should NA value(s) be removed (FALSE by default)? |
Numeric vector of length 1 with coefficient of variation.
Laure Cougnaud
Other stats utility functions:
geomCV()
,
geomMean()
,
geomSD()
,
geomSE()
,
se()
# coefficient of variation of normal distribution tends to 100%
cv(rnorm(n = 1000, mean = 1, sd = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.