Exercise

Visualizing Female Proportion Borrowing

The return type of functions in the bigtabulate and biganalytics packages are base R types that can be used just like you would with any analysis. This means that we can visualize results using ggplot2.

In this exercise, you will visualize the female proportion borrowing for urban and rural areas across all years.

Instructions

100 XP

The matrix prop_female from the previous exercise is available in your workspace.

  • Load the tidyr and ggplot2 packages.
  • Convert prop_female to a data frame using as.data.frame().
  • Add a new column, Year. Set it to the row.names() of prop_female_df.
  • Call gather() on the columns of prop_female_df to convert it into a long format.