title: How to subtract time in each row R
body: <p>I am using R studio in mac. I have defined <code>df</code> as the following. Can anyone help me to calculate time interval for each row?</p>
  
  <pre><code>&gt; df                       
                         V1                  V1.1
  1   "2016-05-12 07:28:11" "2016-05-12 07:58:47"
  2   "2016-05-12 07:27:39" "2016-05-12 07:58:22"
  3   "2016-05-12 07:19:22" "2016-05-12 07:49:40"
  4   "2016-05-12 07:15:12" "2016-05-12 07:47:08"
  5   "2016-05-12 07:26:44" "2016-05-12 07:58:24"
  6   "2016-05-12 07:27:53" "2016-05-12 07:58:33"
  7   "2016-05-12 07:20:20" "2016-05-12 07:53:19"
  8   "2016-05-12 07:28:58" "2016-05-12 08:01:56"
  </code></pre>