Download a copy of the
Portal Teaching Database surveys table
and load it into R using read.csv()
.
Use pipes (%>%
) to combine the following operations to manipulate the data.
mutate()
, select()
, and na.omit()
to create a new data frame with
the year
, species_id
, and weight in kilograms of each individual,
with no null weights.filter()
and select()
to get the year
, month
, day
, and
species_id
columns for all of the rows in the data frame where species_id
is SH
.group_by()
and summarize()
functions to get a count of the number
of individuals in each species ID.group_by()
and summarize()
functions to get a count of the number
of individuals in each species ID in each year.filter()
, group_by()
, and summarize()
functions to get the mean
mass of species DO
in each year.