round.chron: Round Chronological Objects

Description Usage Arguments Details Examples

Description

Given a vector of chron objects, return a vector with values rounded to the given unit. floor.chron will round down and ceiling.chron will round up.

Usage

1
2
3
4
5
  floor.chron(x,
    units = c("minutes", "hours", "days", "months", "years"))

  ceiling.chron(x,
    units = c("minutes", "hours", "days", "months", "years"))

Arguments

x

a chron vector.

units

character. Round to nearest unit, defined as minutes, hours, days, months, or years.

Details

details

Examples

1
2
3
4
5
## Not run: 
  floor.chron(chron(dates = dates(c("01/25/13", "02/03/13", "11/15/13")), times = times(c("06:30:15", "12:19:51", "17:11:13"))), units='hours')
  ceiling.chron(chron(dates = dates(c("01/25/13", "02/03/13", "11/15/13")), times = times(c("06:30:15", "12:19:51", "17:11:13"))), units='months')

## End(Not run)

harrelfe/rreport documentation built on May 17, 2019, 2:48 p.m.