Standardize vectors, data frames, and survey designs
This function is a wrapper around gscale() that is configured
to do a conventional standardization of continuous variables,
mean-centering and dividing by one standard deviation.
standardize( data = NULL, vars = NULL, binary.inputs = "center", binary.factors = TRUE, weights = NULL )
data |
A data frame or survey design. Only needed if you would like to
rescale multiple variables at once. If |
vars |
If |
binary.inputs |
Options for binary variables. Default is |
binary.factors |
Coerce two-level factors to numeric and apply scaling functions to them? Default is TRUE. |
weights |
A vector of weights equal in length to |
Some more information can be found in the documentation for
gscale()
A transformed version of the data argument.
Other standardization:
center_mod(),
center(),
gscale(),
scale_mod()
# Standardize just the "qsec" variable in mtcars standardize(mtcars, vars = "qsec")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.