Merge pull request #78 from MJMarshall/patch-1

Update iteration.Rmd
This commit is contained in:
Hadley Wickham 2016-03-26 13:49:56 -05:00
commit 8114e51386
1 changed files with 1 additions and 1 deletions

View File

@ -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)