Remember to

  • Load surveys.csv data into surveys

Basic aggregation

group_by(surveys, species_id)
surveys_by_species <- group_by(surveys, species_id)
summarize(surveys_by_species, abundance = n())
surveys_by_species_plot <- group_by(surveys, species_id, plot_id)
summarize(surveys_by_species, abundance = n())
species_weight <- summarize(surveys_by_species_plot, avg_weight = mean(weight))
species_weight <- summarize(surveys_by_species,
                            avg_weight = mean(weight, na.rm = TRUE))
na.omit(surveys_weight)

Do Shrub Volume Aggregation.