cv | R Documentation |
Computes the coefficient of variation (CV), by dividing the standard deviation (SD) by the arithmetic mean of a set of numbers. If na_rm
is TRUE
then missing values are removed before calculation is completed
cv(x, na_rm = TRUE)
x |
(numeric) vector of numbers for which to calculate CV |
na_rm |
(logical) whether to remove missing values from both average and SD calculation |
(numeric) coefficient of variation
# Convert from Fahrenheit to Celsius
cv(x = c(4, 5, 6, 4, 5, 5), na_rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.