normalize: Normalize columns (i.e. center around the mean and divide by...

Description Usage Arguments Examples

Description

Normalize columns (i.e. center around the mean and divide by standard deviation).

Usage

1

Arguments

vars

Function or formula that returns selected columns from a data.frame. Alternatively, character vector of column names.

Examples

1
2
3
4
5
6
df <- data.frame(A=c("a1","a1","a2","a3"), B=c("b1", "b2", "b3", "b4"), X=c(1,2,3,4))
prep <- normalize()
prep$fit(df)
prep$transform(df)
# or more succintly
prep$fit_transform(df)

rtsho/preprocessr documentation built on May 29, 2019, 8:58 a.m.