Learn R Programming

ClassifyR (version 1.6.2)

getLocationsAndScales: Calculate Location and Scale

Description

Calculates the location and scale for each feature.

Usage

"getLocationsAndScales"(expression, ...) "getLocationsAndScales"(expression, location = c("mean", "median"), scale = c("SD", "MAD", "Qn"))

Arguments

expression
Either a matrix or ExpressionSet containing data. For a matrix, the rows are features, and the columns are samples.
...
Unused variables from the matrix method passed to the ExpressionSet method.
location
The location to be calculated.
scale
The scale to be calculated.

Value

A list of length 2. The first element contains the location for every feature. The second element contains the scale for every feature.

Details

Location can be either "mean" or "median". Scale can be standard deviation, median absolute deviation, or $Qn$.

References

Qn: http://www.tandfonline.com/doi/pdf/10.1080/01621459.1993.10476408

Examples

Run this code
  genesMatrix <- matrix(rnorm(1000, 8, 4), ncol = 10)
  getLocationsAndScales(genesMatrix, "median", "MAD")

Run the code above in your browser using DataLab