Fix thinko

This commit is contained in:
Hadley Wickham 2021-04-18 15:57:30 -05:00
parent 043d821584
commit 40d7bcb5d0
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ See `?select` for more details.
Instead, use `rename()`, which is a variant of `select()` that keeps all the variables that aren't explicitly mentioned:
```{r}
rename(flights, tailnum = tail_num)
rename(flights, tail_num = tailnum)
```
If you want to move certain variables to the start of the data frame but not drop the others, you can do this in two ways: using `select()` in conjunction with the `everything()` helper or using `relocate()`.