standardize {NCmisc}R Documentation

Convert a numeric vector to Z-scores.

Description

Transform a vector to z scores by subtracting its mean and dividing by its standard deviation

Usage

standardize(X)

Arguments

X

numeric vector to standardize

Value

vector of the same length in standardised form

Author(s)

Nicholas Cooper njcooper@gmx.co.uk

Examples

x1 <- rnorm(10,100,15); x2 <- sample(10)
print(x1) ;  standardize(x1)
print(x2) ;  standardize(x2)

[Package NCmisc version 1.2.0 Index]