powered by
convert object to a units object
convert difftime objects to units
as_units(x, value = unitless)as.units(x, value = unitless)# S3 method for default as_units(x, value = unitless)# S3 method for difftime as_units(x, value)
as.units(x, value = unitless)
# S3 method for default as_units(x, value = unitless)
# S3 method for difftime as_units(x, value)
object of class units
target unit, defaults to `unitless`
# NOT RUN { s = Sys.time() d = s - (s+1) as_units(d) # }
Run the code above in your browser using DataLab