1. Learn
  2. /
  3. Courses
  4. /
  5. Scalable Data Processing in R

Connected

Exercise

Relative change in demographic trend

In the last exercise, you looked at the changes in borrowing across demographics over time. In this exercise, you'll look at the relative change in demographic trend. To do this, you'll normalize each group's trend by borrowing in the first year, 2008.

Instructions

100 XP
  • Get the first column of rydf as column1.
  • Loop over columns 1:8, normalizing them by dividing each column by the first column.
  • Plot Year on the x-axis and Proportion the y-axis, colored and grouped by the Race variable.