Learn R Programming

sail (version 0.1.0)

standardize: Standardize Data

Description

Function that standardizes the data before running the fitting algorithm. This is used in the sail function

Usage

standardize(x, center = TRUE, normalize = FALSE)

Arguments

x

data to be standardized

center

Should x be centered. Default is TRUE

normalize

Should x be scaled to have unit variance. Default is FALSE

Value

list of length 3:

x

centered and possibly normalized x matrix

bx

numeric vector of column means of x matrix

sx

standard deviations (using a divisor of n observations) of columns of x matrix