Skip to contents

This function calculates statistical measure(s) for each column in an input matrix. It is an internal function, and it is not intended to be called by users.

Usage

computeColMeasures(
  x,
  rows = 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

a numerical matrix features-by-samples

rows

(optional) numerical vector giving the rows in x or character vector matching the row names in x to operate over. If missing or rows = NULL, all the rows in x are considered for the computation of the measures

score

character string indicating the statistical measure to compute

na.rm

logical, whether to remove NA values from x before computation

...

further arguments to score

Value

A numerical vector containing the computed score for each column in x.

Details

Internally, computeColMeasures uses these functions to compute the measures:

"sum"

colSummations

"weightedSum"

colWeightedSums

"mean"

colArithmeticMeans

"trimmedMean"

colTrimmedMeans

"weightedMean"

colWeightedArithmeticMeans

"median"

colMidpoints

"mode"

colModes

"midrange"

colMidranges

"midhinge"

colMidhinges

"trimean"

colTrimeans

"iqr"

colIQRs

"iqm"

colIQMs

"mad"

colMADs

"aad"

colAADs

"ssgsea"

colSsgsea

"gsva"

colGsva

"plage"

colPlage

"zscore"

colZscore

Look at the different functions to know which specific arguments they accept (arguments can be passed via the ... parameter).

Author

Alessandro Barberis