Session Ready
Exercise

Wide and Long Data 3

In this exercise, you will explore the wide format of the hdi_data dataframe and convert it to a long format using the gather() function from the tidyr package.

Note that:

  • tidyr is pre-loaded
  • hdi_data_wide dataframe is available in this session
Instructions 1/2
undefined XP
  • 1
  • 2
  • Explore hdi_data_wide using str(). Could you see how many columns in the dataframe?.