scaledf: Center or standardize variables in a data frame
Description
Center or standardize variables in a data frame
Usage
scaledf(dat, center = TRUE, scale = TRUE, sf = 2, wts = NULL,
calc = TRUE)
Arguments
center
Center data (TRUE or FALSE)
scale
Scale data (TRUE or FALSE)
sf
Scaling factor (default is 2)
wts
Weights to use (default is NULL for no weights)
calc
Calculate mean and sd or use attributes attached to dat
See Also
copy_attr
to copy attributes from a traning to a validation dataset