cv: Coefficient of Variation

View source: R/general_small_functions.R

cvR Documentation

Coefficient of Variation

Description

This function computes the Coefficient of Variation (CV) of the values in x.

Usage

cv(x, format = "percent", digits = 2, ...)

Arguments

x

Vector or matrix with values.

format

If the output should be as "percent" (default) or "decimal".

digits

Integer indicating the number of decimal places (see round())

...

Further arguments passed do mean() and sd()

Details

The argument na.rm can be included. Default is FALSE in both mean() and sd(). If set to TRUE, then missing values are removed before computation proceeds.

Value

The CV of the input values.


cekehe/rappp documentation built on May 17, 2022, 8:54 a.m.