standardize: Function to standardize an item or scale.

View source: R/scales.R

standardizeR Documentation

Function to standardize an item or scale.

Description

Standardizes a vector or column of data by centering around the mean and making standard deviation equal to one

Usage

standardize(x)

Arguments

x

A vector of data values to be standardized

Details

Note: This function automatically removes NAs when calculating the mean and standard deviation

Value

Standardized data values

Examples

ex <- standardize(rnorm(100, 10, 5))
mean(ex)
sd(ex)


rwash/surveys documentation built on Sept. 18, 2023, 11:31 p.m.