R/conversion.R
as_difftime.Rd
convert units object into difftime object
as_difftime(x)
object of class units
units
t1 = Sys.time() t2 = t1 + 3600 d = t2 - t1 du <- as_units(d) dt = as_difftime(du) class(dt) #> [1] "difftime" dt #> Time difference of 1 hours