commit
51943e6d10
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue