Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

base-round

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 timeDate.

...

arguments passed to other methods.

Value

The two functions round and trunc allow to round or to truncate timeDate objects to the specified unit and return them as timeDate objects. - Note, ther is an inconsistency round uses digits as argument and not units.

Examples

## round - 

## truncate -

timeDate

Rmetrics - Chronological and Calendar Objects

v3043.102
GPL (>= 2)
Authors
Diethelm Wuertz [aut], Tobias Setz [cre], Yohan Chalabi [ctb], Martin Maechler [ctb], Joe W. Byers [ctb]
Initial release
2018-02-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.