How to find difference in hours between dates in R : <p>I have the following dataframe (DF1):</p>

<pre><code>Date             Value   
29/12/2014 8:00  24.940   
29/12/2014 9:00  24.960   
29/12/2014 11:00 25.020 
</code></pre>

<p>I would like to add a new column for DF1$DIFF, where it contains the difference in values between each line's Date (including hours) to its above Date. So that the required results will be:</p>

<pre><code>Date             Value   Diff
29/12/2014 8:00  24.940   
29/12/2014 9:00  24.960    1
29/12/2014 11:00 25.020    2
</code></pre>

<p>I tried to use the as.date function, however, I get the difference in dates only: </p>

<pre><code>&gt; as.Date("2009-10-01 10:00")- as.Date("2009-10-01 9:00")
Time difference of 0 days
</code></pre>
