Session Ready
Exercise

Averaging a column

Often, it helps to focus our attention on one or two observations in order to benchmark our expectations for the broader dataset. In this exercise​, we average only the polls of President Donald Trump's approval ratings.

Instructions
100 XP
  • Average all of the polls of Donald Trump's approval rating. Do so by adding the pull() function on top of the code you build in Lesson 1.1 to extract the Approve column to a vector
  • Take an average of that vector with the mean() function from base R