Computes z-score of a vector with numeric or logical values.

z_score(x)

Arguments

x

A numeric or logical vector.

Value

The z-score of each value in x returned as a numeric vector of with equal length as the input x vector.

Examples

x <- 1:3 z_score(x)
#> [1] -1 0 1