
Last chance! 50% off unlimited learning
Sale ends in
Rounds and truncates objects of class 'timeDate'.
# S3 method for timeDate
round(x, digits = c("days", "hours", "mins")) # S3 method for timeDate
trunc(x, units = c("days", "hours", "mins"), ...)
an object of class "timeDate"
a character string denoting the date/time units in which the results are desired.
an object of class "timeDate"
.
arguments passed to other methods.
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
.