ceiling.chron {Hmisc} | R Documentation |
ceiling.chron
returns maximum value that is 1 less then the next value on the unit selected in units
.
floor.chron
returns the value that is equal to the first time unit selected in units
.
ceiling.chron(x, units = c("minutes", "hours", "days", "months", "years")) floor.chron(x, units = c("minutes", "hours", "days", "months", "years"))
x |
date to be floored or ceilinged |
units |
unit to that is is rounded up or down to. |
An object of class chron
.
Charles Dupont
library(chron) ceiling.chron(dates('7/13/1832'), units='months') # '7/31/1832' floor.chron(dates('7/13/1832'), units='years') # '1/1/1832'