# >Selecting columns
For these exercises, we’ll use the iris data set build into base R.
- View
iristo see what it looks like.
- Return a data frame with only the sepal data using inclusion.
# >- Return a data frame with only the sepal data using a helper function.
# >- Return a data frame with the sepal and petal data using a helper function.
# >- Return a data frame with the sepal and petal data using exclusion.
# >- Move
Speciesto be the first column usingselect()and a helper function.
# >- Move
Speciesto be the first column usingrelocate().
# >- Rename
Speciestospeciesusingselect().
# >- Rename
Speciestospeciesusingrename().
# >