View source: R/HelperFunctions.R
std | R Documentation |
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)
x |
Numeric vector to standardize |
Standardized vector with sample mean 0 and standard deviation 1
x <- c(1, 2, 3, 4, 5)
std(x)
print(mean(x))
print(sd(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.