This function computes a statistical measure from an input vector. It is an internal function, and it is not intended to be called by users.
Usage
computeVectorMeasure(
x,
i = NULL,
score = c("sum", "weightedSum", "mean", "trimmedMean", "weightedMean", "median",
"mode", "midrange", "midhinge", "trimean", "iqm", "iqr", "mad", "aad", "ssgsea",
"gsva", "plage", "zscore"),
na.rm = TRUE,
...
)Arguments
- x
(named) numerical vector
- i
(optional) numerical vector giving the position in
xor character vector matching the names inx. Ifmissingori = NULL, the entirexis considered for the computation of the score- score
character string indicating the statistical measure to compute
- na.rm
logical, whether to remove
NAvalues fromxbefore computation- ...
further arguments to
score
Value
A numerical value representing the computed measure.
A default NA value is returned if the score can't be
computed.
See also
summation,
weightedSum,
arithmeticMean,
trimmedMean,
weightedMean,
midpoint,
modalValue,
midrange,
midhinge,
trimean,
iqr,
IQM,
MAD,
AAD,
ssgsea,
gsva,
plage,
zscore