standardize_vars | R Documentation |
Centre then divide by the standard error of the values in a numeric variable
standardize_vars(data, vars, names = NULL)
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
Zhaoming Su
code
standardized <- standardize_vars(iris, var = c("Sepal.Width", "Petal.Width"))
cat(code(standardized))
head(standardized)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.