powered by
granularity(str = NA, period = NA, duration = NA, origin = NA, timeZone = NA)
- as a simple string: "day", "hour", "minute", "all", "none"
- as a number, representing the number of seconds in each period
- as an ISO period, such as "P1M", "P1W", PT1H", etc.
granularity("day") granularity("PT6H", timeZone="America/Los_Angeles") granularity(3600 * 2, origin=ymd_hms("2013-01-01T01:00:00"))
Run the code above in your browser using DataLab