Description Usage Arguments Value
View source: R/local_preprocessing_functions.R
Mean-centers each variable in a block of data and then scale each variable to unit variance
1 2 3 4 | standardize(
input_data,
settings = list(column_means = NULL, column_stds = NULL)
)
|
input_data |
A matrix containing data. The rows indicate the samples, the columns indicate the variables. |
settings |
A list with a two named elements "column_stds" and "column_means". When "column_stds" is set, the supplied vector is used for scaling, otherwise it is calculated. When "column_means" is set, the supplied vector is used for mean substraction. Both vectors should have a length equal to the number of variables. All named elements can be set, and optionally left out, seperately. |
A named list with "preprocessed_data": the scaled input_data matrix, and "settings", which is equal to the settings input parameter when set, and otherwise contains the calculated and used column_stds and column_means.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.