standardizeVars {iNZightTools} | R Documentation |
Centre then divide by the standard error of the values in a numeric variable
standardizeVars(.data, vars, names = paste(sep = ".", vars, "std"))
.data |
a dataframe with the columns to standardize |
vars |
a character vector of the numeric variables in |
names |
names for the created variables |
the original dataframe containing new columns of the standardized variables with tidyverse code attached
Owen Jin, Tom Elliott
standardized <- standardizeVars(iris, var = c("Sepal.Width", "Petal.Width"))
cat(code(standardized))
head(standardized)