stdize | R Documentation |
Standardize Variable
stdize(variable, to, condition, na.rm = TRUE)
variable |
Unquoted name of variable to standardize |
condition |
Logical vector (TRUE or FALSE) used to subset |
na.rm |
Option to remove NA's when calculating mean and standard deviation. Set to |
compare |
Variable to use to calculate mean and standard deviation from |
A vector with the standardized variable
var <- rnorm(100, mean = 0.5, sd = 1)
var_std <- stdize(var)
summary(var_std)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.