round {timeDate} | R Documentation |
Rounding and truncating 'timeDate' objects
Description
Rounds and truncates objects of class 'timeDate'.
Usage
## S3 method for class 'timeDate'
round(x, digits = c("days", "hours", "mins"))
## S3 method for class 'timeDate'
trunc(x, units = c("days", "hours", "mins"), ...)
Arguments
digits , units |
a character string denoting the date/time units in which the results are desired. |
x |
an object of class |
... |
arguments passed to other methods. |
Details
The two functions round
and trunc
allow to round or to
truncate "timeDate"
objects to the specified unit and return
them as "timeDate"
objects.
There is an inconsistency in that round
uses digits
as
argument and not units
.
Value
an object of class "timeDate"
Examples
## round -
## truncate -
[Package timeDate version 4032.109 Index]