title: How to find the difference between two dates in hours in R?
body: <p>At the extreme risk of being modded down for asking "obvious" questions, how do I find the difference between two dates in hours in R?</p>
  
  <pre><code>&gt; ISOdate(2004,1,6) - ISOdate(2004,1,1)
  Time difference of 5 days
  &gt; as.POSIXlt(ISOdate(2004,1,6) - ISOdate(2004,1,1))
  Error in as.POSIXlt.default(ISOdate(2004, 1, 6) - ISOdate(2004, 1, 1)) : 
    do not know how to convert 'ISOdate(2004, 1, 6) - ISOdate(2004, 1, 1)' to class "POSIXlt"
   &gt; (ISOdate(2004,1,6) - ISOdate(2004,1,1))$year
  Error in (ISOdate(2004, 1, 6) - ISOdate(2004, 1, 1))$year : 
    $ operator is invalid for atomic vectors
  &gt; (ISOdate(2004,1,6) - ISOdate(2004,1,1))$mon
  Error in (ISOdate(2004, 1, 6) - ISOdate(2004, 1, 1))$mon : 
    $ operator is invalid for atomic vectors
  </code></pre>