powered by
Centers a vector by its sample mean, then scales it by its sample standard deviation \((\text{x}-\text{mean}(\text{x}))/\text{sd}(\text{x})\).
std(x)
Standardized vector with sample mean 0 and standard deviation 1
Numeric vector to standardize
x <- c(1, 2, 3, 4, 5) std(x) print(mean(x)) print(sd(x))
Run the code above in your browser using DataLab