# >
Selecting columns
For these exercises, we’ll use the iris
data set build into base R.
- View
iris
to 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
Species
to be the first column usingselect()
and a helper function.
# >
- Move
Species
to be the first column usingrelocate()
.
# >
- Rename
Species
tospecies
usingselect()
.
# >
- Rename
Species
tospecies
usingrename()
.
# >