title: calculating timeframe accuracy in R
body: <p>I am trying to look at prediction accuracy related to timeframes related to hospital discharge.</p>
  <p>For example, I think Mr. Smith will be discharged within 3-7 days, which would mean he could any day from 11/9-11/13 would be correct. If he discharges in 2 days, I would say I was 1 day off and if he discharges within 10 days, I was 3 days off...</p>
  <p>Is there any good method to do this using dplyr, base R, and lubridate? TIA. Sample data is at the link:</p>
  <p><a href="https://i.stack.imgur.com/rLIHw.png" rel="nofollow noreferrer">Sample data</a></p>