R/general_helpers.R
se.Rd
Calculates the standard error of the mean for a numeric variable, removing NA values automatically.
se(variable)
A numeric vector
Standard error of the mean (numeric scalar)
se(c(1, 2, 3, 4, 5)) #> [1] 0.7071068 se(c(1, 2, NA, 4, 5)) # NAs removed automatically #> [1] 0.9128709