diff --git a/iteration.Rmd b/iteration.Rmd index 1ff0b11..ce6e28a 100644 --- a/iteration.Rmd +++ b/iteration.Rmd @@ -137,7 +137,7 @@ That's all there is to the for loop! Now is a good time to practice creating som for (i in seq_along(x)) { sd <- sd + (x[i] - mean(x)) ^ 2 } - sd <- sqrt(sd) / (length(x) - 1) + sd <- sqrt(sd / (length(x) - 1)) x <- runif(100) out <- vector("numeric", length(x))