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