as.units {units}R Documentation

convert object to a units object

Description

convert object to a units object

convert difftime objects to units

Usage

as.units(x, value = unitless)

## Default S3 method:
as.units(x, value = unitless)

## S3 method for class 'difftime'
as.units(x, value)

Arguments

x

object of class units

value

target unit, defaults to 'unitless'

Examples

s = Sys.time()
d  = s - (s+1)
as.units(d)

[Package units version 0.4-5 Index]