This function standardizes quantitative variables in a data frame while leaving the others untouched. This leaves not only factors, but also binary variables (those with values 0, 1, or NA).
scaleDataFrame(data, numsd = 1, nvals_fac = 11, exclude = NULL)
A data frame.
Number of standard deviations to divide by - defaults to 1.
Number of unique values required to standardize - variables with fewer than `nvals_fac` unique values will not be standardized.
A character vector of names of variables to exclude from the standardization.
A data frame with standardized quantitative variables