as.dt {units} | R Documentation |
convert units object into difftime object
as.dt(x)
x |
object of class |
as.difftime is not a generic, hence this strange name.
t1 = Sys.time() t2 = t1 + 3600 d = t2 - t1 du <- as.units(d) dt = as.dt(du) class(dt) dt