title: datetime object to minutes: I need 3 packages
body: <p>I am wondering if I am missing something?!</p>
  <p>I would like to know: is there a better/shorter way to get minutes from a datetime object:</p>
  <p><strong>Lessons studied so far:</strong></p>
  <p><a href="https://stackoverflow.com/questions/50736661/extract-time-hms-from-lubridate-date-time-object">Extract time (HMS) from lubridate date time object?</a></p>
  <p><a href="https://stackoverflow.com/questions/49893983/converting-from-hms-to-hourminute-in-r-or-rounding-in-minutes-from-hms/49898056">converting from hms to hour:minute in r, or rounding in minutes from hms</a></p>
  <p><a href="https://stackoverflow.com/questions/29067375/r-convert-hoursminutesseconds">R: Convert hours:minutes:seconds</a></p>
  <p>My tibble:</p>
  <pre><code>df &lt;- structure(list(dttm = structure(c(-2209068000, -2209069200, -2209061520, 
  -2209064100, -2209065240), tzone = &quot;UTC&quot;, class = c(&quot;POSIXct&quot;, 
  &quot;POSIXt&quot;))), row.names = c(NA, -5L), class = c(&quot;tbl_df&quot;, &quot;tbl&quot;, 
  &quot;data.frame&quot;))
  
  # A tibble: 5 x 1
    dttm               
    &lt;dttm&gt;             
  1 1899-12-31 02:00:00
  2 1899-12-31 01:40:00
  3 1899-12-31 03:48:00
  4 1899-12-31 03:05:00
  5 1899-12-31 02:46:00
  </code></pre>
  <p>I would like to add a new column with minutes as integer:</p>
  <p>My approach so far:</p>
  <pre><code>library(dplyr)
  library(lubridate)  # ymd_hms
  library(hms)        # as_hms
  library(chron)      # times
  
  test %&gt;% 
      mutate(dttm_min = as_hms(ymd_hms(dttm)),
             dttm_min = 60*24*as.numeric(times(dttm_min)))
  
  # A tibble: 5 x 2
    dttm                dttm_min
    &lt;dttm&gt;                 &lt;dbl&gt;
  1 1899-12-31 02:00:00      120
  2 1899-12-31 01:40:00      100
  3 1899-12-31 03:48:00      228
  4 1899-12-31 03:05:00      185
  5 1899-12-31 02:46:00      166
  </code></pre>
  <p>This gives me the result I want, but I need for this operation 3 packages. Is there a more direct way?</p>