Standardize

standardize(x, na.rm = TRUE)

Arguments

x

Input variable

na.rm

If TRUE missing values are removed before calculation

Value

If x is a numeric variable return (x - mean(x)) / sd(x)