z: Convert numeric vector to z-values

Description Usage Arguments Value Examples

View source: R/misc_stats.R

Description

A trivial scaling function. You might as well use base::scale, which allows arbitrary centers and scales, but returns a matrix by default.

Usage

1
z(x)

Arguments

x

A numeric vector.

Value

A vector of z-values of the same length as x.

Examples

1
2
3
x <- rnorm(500, mean = 10, sd = 5)
z_vals <- z(x)
round(c(mean = mean(z_vals), sd = sd(z_vals)), 2)

tadaadata/tadaatoolbox documentation built on June 3, 2020, 10:34 a.m.