Life Expectancy 1950 - 1990

  1. Download the RMarkdown file with these homework instructions to use as a template for your work. Make sure to replace “Your Name” in the YAML with your name.

  2. In class, we have discussed life expectancy in Canada, Mexico and the United States in the 50s and 60s. Additional data for the 70s and 80s is available in the file gap7080.csv. Use the R Markdown file with the sample solution for the test case (see the online schedule for a link) to extend our class solution and include values for the 70s and 80s, i.e. you are asked to
    1. Visualize the life expectancy for the United States, Canada and Mexico in a line chart (with three lines in different colours).
    2. Comment in your writeup about what you see in the plot. Make sure that the incorrect value for Canada in 1957 is fixed.

Note:

  1. this homework is supposed to be mainly a code reading exercise. You should not have to program extensively. Instead, you have to figure out which pieces you need to copy and adjust.
  2. the R command for combining two datasets that have the same structure is rbind, used as:
combined <- rbind(data1, data2)

For the submission: submit your solution in an R Markdown file and (just for insurance) submit the corresponding html file with it.