pre_process: Pre-process feature matrices before analysis.

Description Usage Arguments Details Value

Description

Often, data must be adjusted (scaled, imputed, etc.) before it can be analysed. This method presents a simple and consistent interface for the same.

Usage

1
pre_process(m, method = c("center", "scale"), ...)

Arguments

m

a feature matrix with samples in rows and features in columns.

method

list of preprocessing methods as defined in caret::preProcess, centering and scaling it by default. See preProcess.

...

preprocessing methods parameters as required by caret::preProcess

Details

Internally this is a wrapper of the equivalent methods from the caret package, that simplifies and streamlines usage. Note that while it suits our purposes to have a single step to adjust the data, caret package presents this as two steps - assess preprocessing and then carry it out. This is because you may need to calculate preprocessing over the training data and then transform the training & test data in the same way, or where you wish to explicitly capture the preprocessing stage (e.g. PCA).

Value

the preprocessed data.


agapow/subtypr documentation built on May 5, 2019, 1:33 a.m.