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
x
or character vector matching the names inx
. Ifmissing
ori = NULL
, the entirex
is considered for the computation of the score- score
character string indicating the statistical measure to compute
- na.rm
logical, whether to remove
NA
values fromx
before 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