diff --git a/data-transform.Rmd b/data-transform.Rmd index 2aab1ea..e3477a0 100644 --- a/data-transform.Rmd +++ b/data-transform.Rmd @@ -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()`.