Session Ready
Exercise

Averaging approval ratings by president

It is often useful to compare groups of observations to each other. In the Gallup approval ratings dataset, we can compare the popularity of each U.S. president to each other by taking an average of all the polls taken during their administration. This way, we'll know who were the most and least popular U.S. presidents, and gain insight into who were the best and worst.

The dplyr package has been loaded for you

Instructions
100 XP
  • Use the group_by() and summarise() functions from dplyr to create an average (or mean) approval rating for all presidents in the dataset.