Fixing typos in vectors.Rmd (#319)

This commit is contained in:
Brett Klamer 2016-08-26 12:50:29 -04:00 committed by Hadley Wickham
parent 4ac126bc08
commit 884c561f62
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ So far we've used `dplyr::filter()` to filter the rows in a tibble. `filter()` o
all the columns, and `x[, -1]` selects all rows and all columns except
the first.
To learn more about the applications of subseting, reading the "Subsetting" chapter of _Advanced R_: <http://adv-r.had.co.nz/Subsetting.html#applications>.
To learn more about the applications of subsetting, reading the "Subsetting" chapter of _Advanced R_: <http://adv-r.had.co.nz/Subsetting.html#applications>.
There is an important variation of `[` called `[[`. `[[` only ever extracts a single element, and always drops names. It's a good idea to use it whenever you want to make it clear that you're extracting a single item, as in a for loop. The distinction between `[` and `[[` is most important for lists, as we'll see shortly.