From d8f3bbddb457bd256c0cff2093156af6916c7547 Mon Sep 17 00:00:00 2001 From: MJMarshall Date: Sat, 26 Mar 2016 10:07:13 +0000 Subject: [PATCH] Update iteration.Rmd Correcting typo in exercise code --- iteration.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iteration.Rmd b/iteration.Rmd index 78438dc..36288c1 100644 --- a/iteration.Rmd +++ b/iteration.Rmd @@ -130,7 +130,7 @@ That's all there is to the for loop! Now is a good time to practice creating som x <- sample(100) sd <- 0 - for (i in seq_along(out)) { + for (i in seq_along(x)) { sd <- sd + (x[i] - mean(x)) ^ 2 } sd <- sqrt(sd) / (length(x) - 1)