cv: Calculate coefficient of variation

View source: R/tab_values.R

cvR Documentation

Calculate coefficient of variation

Description

The function cv calculates the coefficient of variation from columns of a matrix. The coefficients of variation are calculated according to the formula sd(y) / mean(y) * 100 with y the column values, thus, the function returns the coefficient of variation in percentage.

Usage

cv(x, name = "raw")

Arguments

x

matrix

name

character, the name of the returned list

Details

The function returned a named list (the name is specified by the name argument) containing the coefficient of variation of the columns of x.

Value

list

Examples

x <- matrix(seq_len(10), ncol = 2)
cv(x)


tnaake/MatrixQCvis documentation built on Nov. 4, 2024, 7:42 a.m.