Difference in code

This commit is contained in:
OaCantona 2016-03-26 11:40:27 +01:00
parent 5c7cf27b2a
commit a0fb7283b0
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.