datetime2fac: Create a factor vector out of a date-time vector
Description
Create a factor vector out of a date-time vector from
class "POSIXt" or "Date".Usage
datetime2fac(p, rng = range(p, na.rm = TRUE))
Details
The range rng is cut according to different pretty
rounded time periods. The cut with the number of levels
that is closest to 6 is chosen. Vector p is cut
accordingly. Values of p outside rng are
translated to NA.