as_units {units} | R Documentation |
convert object to a units object
convert difftime objects to units
as_units(x, value = unitless) as.units(x, value = unitless) ## Default S3 method: as_units(x, value = unitless) ## S3 method for class 'difftime' as_units(x, value)
x |
object of class units |
value |
target unit, defaults to 'unitless' |
s = Sys.time() d = s - (s+1) as_units(d)