std_var: Standardize Variable

Description Usage Arguments Value Examples

View source: R/formats.R

Description

Standardize variable by centering on its mean and dividing by its standard deviation. The new variable will now have a mean of 0 and a standard deviation of 1. All missing data points are excluded from the mean and deviation calculations.

Usage

1

Arguments

x

Numeric variable to be formatted.

Value

The standardized x.

Examples

1
2
std_var(iris$Petal.Length)
std_var(cars$speed)

dgrisafe/styledom documentation built on April 9, 2021, 5:44 a.m.