rsd: Calculate relative standard deviations 'rsd' and 'rowRsd' are...

View source: R/rsd.R

rsdR Documentation

Calculate relative standard deviations rsd and rowRsd are convenience functions to calculate the relative standard deviation (i.e. coefficient of variation) of a numerical vector or for rows of a numerical matrix, respectively.

Description

Calculate relative standard deviations

rsd and rowRsd are convenience functions to calculate the relative standard deviation (i.e. coefficient of variation) of a numerical vector or for rows of a numerical matrix, respectively.

Usage

rsd(x, na.rm = TRUE, mad = FALSE)

rowRsd(x, na.rm = TRUE, mad = FALSE)

Arguments

x

for rsd a numeric, for rowRsd a numerical matrix.

na.rm

logical(1) whether missing values (NA) should be removed prior to the calculations.

mad

logical(1) whether the Median Absolute Deviation (MAD) should be used instead of the standard deviation. This is suggested for non-gaussian distributed data.

Author(s)

Johannes Rainer

Examples


a <- c(4.3, 4.5, 3.6, 5.3)
rsd(a)

A <- rbind(a, a, a)
rowRsd(A)

EuracBiomedicalResearch/CompMetaboTools documentation built on May 5, 2022, 6:43 a.m.