title: R functions to divide person-time by year of observation
body: <p>Been a little stuck on this for a couple days.
  Let's say I have a cohort of 2 people.</p>
  <p>Person 1 was in cohort from 01/01/2000 to 01/03/2001.
  Person 2 was in cohort from 01/01/1999 to 31/12/2001.</p>
  <p>This means person 1 was in the cohort for all of 2000 and 25% of 2001.
  Person 2 was in the cohort for all of 1999, all of 2000, and all of 2001.</p>
  <p>Adding this together means that, in total, the cohort contributed 1 year of person-time in 1999,
  2 years of person-time in 2000, and 1.25 years of person-time in 2001.</p>
  <p>Does anyone know of any R functions that might help with dividing up/summing time elapsed between dates like this? I could write it all from scratch, but I'd like to use existing functions if they're out there, and Google has got me nowhere.</p>
  <p>Thanks!</p>