R/coeffVar.R

Defines functions coeffVar

Documented in coeffVar

#' Calculate the coefficient of variation
#'
#' @param x numeric vector
#'
#' @return coefficient of variation of vector
#' 
#' @examples
#' coeffVar(seq(0, 10))
#' @export
#' 
coeffVar <- function(x) {
  sd(x) / mean(x) * 100
}
johngodlee/JLGMisc documentation built on June 29, 2024, 9:15 p.m.