Merge pull request #79 from OaCantona/patch-4

Difference in code
This commit is contained in:
Hadley Wickham 2016-03-26 13:49:35 -05:00
commit 51943e6d10
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ Every for loop has three components:
it's easy to create them accidentally. If you use `1:length(x)` instead
of `seq_along(x)`, you're likely to get a confusing error message.
1. The __body__: `output[i] <- median(df[[i]])`. This is the code that does
1. The __body__: `output[[i]] <- median(df[[i]])`. This is the code that does
the work. It's run repeatedly, each time with a different value for `i`.
The first iteration will run `output[[1]] <- median(df[[1]])`,
the second will run `output[[2]] <- median(df[[2]])`, and so on.