prep: Class for preprocessing object/item.

View source: R/prep.R

prepR Documentation

Class for preprocessing object/item.

Description

Class for preprocessing object/item.

Usage

prep(name, ...)

Arguments

name

short text with name for the preprocessing method.

...

a list with named parameters for the method (if empty - default parameters will be used).

Details

Use this class to create a list with a sequence of preprocessing methods to keep them together in right order and with defined parameters. The list/object can be provided as an extra argument to any modelling function (e.g. pca, pls, etc), so the optimal model parameters and the optimal preprocessing will be stored together and can be applied to a raw data by using method predict.

For your own preprocessing method you need to create a function, which takes matrix with values (dataset) as the first argument, does something and then return a matrix with the same dimension and same attributes as the result. The method can have any number of optional parameters.

See Bookdown tutorial for details.


mdatools documentation built on March 6, 2026, 5:08 p.m.