featureCV {MSnbase} | R Documentation |
This function calculates the column-wise coefficient of variation (CV), i.e.
the ration between the standard deviation and the mean, for the features
in an "MSnSet"
. The CVs are calculated for the groups
of features defined by groupBy
. For groups defined by single features,
NA
is returned.
featureCV(x, groupBy, na.rm = TRUE, norm = c("sum", "max", "none", "center.mean", "center.median", "quantiles", "quantiles.robust"))
x |
An instance of class |
groupBy |
An object of class |
na.rm |
A |
norm |
One of 'none' (default), 'sum', 'max', 'center.mean', 'center.median'
'quantiles' or 'quantiles.robust' defining if and how the data should be normalised
prior to CV calculation. See |
A matrix
of dimensions length(levels(groupBy))
by ncol(x)
with the respecive CVs.
Laurent Gatto <lg390@cam.ac.uk>, Sebastian Gibb <mail@sebastiangibb.de>
data(msnset) msnset <- msnset[1:4] gb <- factor(rep(1:2, each = 2)) featureCV(msnset, gb)