title: Round off periods to nearest minutes using lubridate
body: <p>I was  wondering if we can round off <code>period</code> to nearest minutes using <code>lubridate</code>. For ex - the value of <code>time_diff</code> is &quot;2H 13M 9S&quot;. How can I get round off <code>time_diff</code> to nearest minute to get &quot;2H 13M&quot; (remove seconds)</p>
  <pre><code>library(lubridate)
  
  time_1 &lt;- ymd_hms(&quot;2021-01-01 12:12:36&quot;)
  time_2 &lt;- ymd_hms(&quot;2021-01-01 14:25:45&quot;)
  
  time_diff &lt;- seconds_to_period(difftime(time_2, time_1, units = 'sec'))
  </code></pre>