standardize: Standardize a numeric vector

View source: R/utilities.R

standardizeR Documentation

Standardize a numeric vector

Description

This function standardizes a numeric vector by subtracting the mean and dividing by the standard deviation. The resulting vector will have a mean of 0 and a standard deviation of 1.

Usage

standardize(x)

Arguments

x

A numeric vector to be standardized.

Value

A numeric vector of the same length as x, containing the standardized values.

Examples

data <- c(1, 2, 3, 4, 5)
standardized_data <- standardize(data)
print(standardized_data)


cNORM documentation built on Nov. 4, 2024, 5:07 p.m.