master
dplyr
my_vec <- c(1, 2, 3, 4, 5, 6)
my_vec * 2 ## [1] 2 4 6 8 10 12
my_vec * c(2, 100) ## [1] 2 200 6 400 10 600
\(\sum_{i = 0}^n\dfrac{(x_i - \bar{x})^2}{n -1}\)
n_1 <- length(my_vec) - 1 x_bar <- mean(my_vec)
sum(((my_vec - x_bar)^2) / n_1) ## [1] 3.5