zscores: Center and standardize a vector

Description Usage Arguments Value Examples

Description

This function converts a vector of observations to z-scores, by subtracting the sample mean and dividing by the sample standard deviation.

Usage

1
zscores(x, na.rm = FALSE)

Arguments

x

A vector of observations

na.rm

Remove missing values? Defaults to TRUE.

Value

The z-scores corresponding to x.

Examples

1
2
y <- rnorm(10, 5, 10)
zscores(y)

fditraglia/frankmisc documentation built on May 16, 2019, 12:11 p.m.