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 May 6, 2024, 8:19 p.m.