Selecting columns

Author

Jeffrey R. Stevens

Published

February 13, 2023

For these exercises, we’ll use the iris data set build into base R.

  1. View iris to see what it looks like.
# >
  1. Return a data frame with only the sepal data using inclusion.
# >
  1. Return a data frame with only the sepal data using a helper function.
# >
  1. Return a data frame with the sepal and petal data using a helper function.
# >
  1. Return a data frame with the sepal and petal data using exclusion.
# >
  1. Move Species to be the first column using select() and a helper function.
# >
  1. Move Species to be the first column using relocate().
# >
  1. Rename Species to species using select().
# >
  1. Rename Species to species using rename().
# >