Length of geologic periods

Exercise Type: Implementation

Instructions

Calculate the length of all Post Paleozoic geological periods! Here is a subset of the steps that need to be taken:

  1. Download this file: stages.csv

  2. Read it into R with read.csv()!

  3. Subset to Mesozoic + Cenozoic!

  4. Calculate the duration of every System/Period! You can do this with a for() loop. The duration of a period is the difference between the older boundary of its first stage and the younger boundary of its last stage.

  5. Plot a histogram of the durations! You can do this by putting the result of of step 4 into the hist() function!

Expected output

A named numeric vector:

names: periods/systems values: durations in millions of years.