Data aggregation


Exercise 5

For this exercise, you will be working with the surveys.csv data set.

  1. Load surveys.csv into R using read.csv() and assign it to an object called surveys.
  2. Use the group_by() and summarize() functions to get a count of the number of individuals with each species ID.
  3. Use the group_by() and summarize() functions to get a count of the number of individuals with each species ID in each year.
  4. Use the filter(), group_by(), and summarize() functions to get the mean mass of species with species_id equals to DO in each year.