Skip to contents

Computation of the coefficient of variation (CV).

Usage

calc_cv(x, as_perc = FALSE)

Arguments

x

A numeric vector

as_perc

A boolean value, if TRUE the function will multiply the CV by 100 (default = FALSE)

Value

A numeric single value with the computed CV.

Examples


x <- rnorm(100,1)

calc_cv(x)
#> [1] 0.86