rowGrpCV: Row group CV

View source: R/rowGrpCV.R

rowGrpCVR Documentation

Row group CV

Description

This function calculates CVs for matrix with multiple groups of data, ie one CV for each group of data. Groups are specified as columns of 'x' in 'grp' (so length of grp should match number of columns of 'x', NAs are allowed)

Usage

rowGrpCV(x, grp, means = NULL, listOutp = FALSE)

Arguments

x

numeric matrix where relplicates are organized into separate columns

grp

(factor) defining which columns should be grouped (considered as replicates)

means

(numeric) alternative values instead of means by .rowGrpMeans()

listOutp

(logical) if TRUE, provide output as list with $CV, $mean and $n

Value

This function returns a matrix of CV values

See Also

rowCVs, arrayCV, replPlateCV

Examples

set.seed(2016); dat1 <- matrix(c(runif(200)+rep(1:10,20)),ncol=10)
head(rowGrpCV(dat1, gr=gl(4,3,labels=LETTERS[1:4])[2:11]))

wrMisc documentation built on Sept. 11, 2024, 6:10 p.m.