Skip to contents

Normalizes with z score

Usage

zscore(x, na.rm = TRUE)

Arguments

x

Input variable

na.rm

If TRUE missing values are removed before calculation

Value

If x is a numeric variable return (x - mean(x)) / sd(x)

Examples

x <- data$Total_Power
x_zscore <- zscore(x)
head(x)
#> [1] 184.8 162.4 186.8 164.8 179.6 175.2