These exercises cover the sections of Data wrangling with tidy.
All files can be found in the “dataset” directory.
Exercise 8
- Create a nested dataframe of df1. Specifically only of the two largest groups by common_name, and nest by the common_name.
- Create a linear model between length_mm and IGF1_ng_ml using purrr over the nested dataframe. Add the results back to the dataframe
- Create a new nested variable containing projections for length_mm based on your linear model (the function predict will be helpful here).