std {lgspline} | R Documentation |
Standardize Vector to Z-Scores
Description
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})
.
Usage
std(x)
Arguments
x |
Numeric vector to standardize |
Value
Standardized vector with sample mean 0 and standard deviation 1
Examples
x <- c(1, 2, 3, 4, 5)
std(x)
print(mean(x))
print(sd(x))
[Package lgspline version 0.2.0 Index]