Description Usage Arguments Details Value Author(s) Examples
For each numeric feature, calculates the location, and subtracts all measurements from that location.
1 2 3 4 5 6 7 8 9 | ## S4 method for signature 'matrix'
subtractFromLocation(measurements, training, location = c("mean", "median"),
absolute = TRUE, verbose = 3)
## S4 method for signature 'DataFrame'
subtractFromLocation(measurements, training, location = c("mean", "median"),
absolute = TRUE, verbose = 3)
## S4 method for signature 'MultiAssayExperiment'
subtractFromLocation(measurements, training, targets = names(measurements),
location = c("mean", "median"), absolute = TRUE, verbose = 3)
|
measurements |
A |
training |
A vector specifying which samples are in the training set. |
location |
Character. Either "mean" or "median". |
absolute |
Logical. Default: |
targets |
If |
verbose |
Default: 3. A progress message is shown if this value is 3. |
Only the samples specified by training
are used in the calculation of the location.
To use all samples for calculation of the location, simply provide indices of all the samples.
The same class of variable as the input variable measurements
is, with the numeric features
subtracted from the calculated location.
Dario Strbenac
1 2 | aMatrix <- matrix(1:100, ncol = 10)
subtractFromLocation(aMatrix, training = 1:5, "median")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.