asDifftime {ThomasJeffersonUniv}R Documentation

Create Time Differences, Extended

Description

To create difftime object with additional time units 'months' and 'years'.

Usage

asDifftime(
  tim,
  units = names(timeUnits()),
  negative_do = stop(sQuote(deparse1(substitute(tim))), " has negative value!"),
  ...
)

Arguments

tim

numeric or difftime object, similar usage as in function as.difftime

units

character scalar, similar usage as in function as.difftime, but with additional options 'months' and 'years'

negative_do

exception handling if input tim has negative element(s). Default is to stop

...

additional parameters, currently not in use

Details

Function asDifftime improves function as.difftime in terms that

Value

Function asDifftime returns a difftime object.

Note

Potential name clash with function as_difftime


[Package ThomasJeffersonUniv version 0.1.3 Index]