standardize_vars: Standardize the data of a numeric variable

View source: R/mutate.R

standardize_varsR Documentation

Standardize the data of a numeric variable

Description

Centre then divide by the standard error of the values in a numeric variable

Usage

standardize_vars(data, vars, names = NULL)

Arguments

data

a dataframe with the columns to standardize

vars

a character vector of the numeric variables in data to standardize

names

names for the created variables

Value

the original dataframe containing new columns of the standardized variables with tidyverse code attached

Author(s)

Zhaoming Su

See Also

code

Examples

standardized <- standardize_vars(iris, var = c("Sepal.Width", "Petal.Width"))
cat(code(standardized))
head(standardized)


iNZightTools documentation built on Oct. 12, 2023, 5:06 p.m.