Correct variable order

Fixes #835
This commit is contained in:
Hadley Wickham 2021-04-18 09:08:34 -05:00
parent 952d1ab4f0
commit 5d96dd41b9
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, tail_num = tailnum)
rename(flights, tailnum = tail_num)
```
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()`.