z_trans: z-Transformation

Description Usage Arguments Value Examples

Description

Scale data by it's mean and standard deviation. This function is almost equivalent to scale, but it does not set any attributes and returns a simple vector, so it should be easier to use within dplyr-workflows.

Usage

1
z_trans(x, na.rm = FALSE)

Arguments

x

A vector with numeric data.

na.rm

If TRUE, missing values (NA) will be ignored.

Value

A vector of the same length as the input of type numeric.

Examples

1
2
3
4
5
## Not run: 
x <- c(1, 2, 6, 2, 1, 5, 7, 8, 4, 3, 2, 2, 2)
z_trans(x)

## End(Not run)

jemus42/qmtut documentation built on May 19, 2019, 4:03 a.m.