n_zscore: Z-score a vector

View source: R/normalise.R

n_zscoreR Documentation

Z-score a vector

Description

Standardises a vector x by scaling it to have a mean and standard deviation specified by m_sd.

Usage

n_zscore(x, m_sd = c(0, 1))

Arguments

x

A numeric vector

m_sd

A vector c(m, sd), where m is desired mean and sd is the target standard deviation.

Value

Numeric vector

Examples

x <- runif(20)
n_zscore(x)


COINr documentation built on Oct. 9, 2023, 5:07 p.m.