Shrub Volume Aggregation (dplyr)
Dr. Morales wants some summary data of the plants at her sites and for her experiments.
If the file shrub-volume-data.csv is not already in your work space download it.
Load the data using read_csv
.
- Use
drop_na
,group_by
andsummarize
to calculate and print the average height of a plant in each experiment, while ignoring plants that have a height ofNA
when calculating the average. - Use
drop_na
,group_by
andsummarize
to determine the maximum height of a plant at each site, while ignoring plants that have a height ofNA
when calculating the maximum. - Use
mutate
,drop_na
,group_by
andsummarize
to determine the average volume (volume = length * width * height) of a plant in each site, while ignoring plants that have volumes ofNA
when calculating the average. - Use
mutate
,drop_na
,group_by
andsummarize
to determine both the average volume and the number of plants in each experiment, while ignoring plants that have volumes ofNA
when calculating the average and when counting plants.