Read-only queries on the timeframe hierarchy of a Calendar —
the time-side mirror of geoscales::geoscale_geoframes() and friends.
Usage
# S3 method for class 'Calendar'
names(x)
calendar_timeframes(x, finest = FALSE)
calendar_rank(x, timeframe)
calendar_timeslices(x, timeframe = NULL)Arguments
- x
A Calendar.
- finest
calendar_timeframes()only: return just the finest timeframe (the leaf layer) instead of the full ordered vector — the twin ofgeoscales::geoscale_geoframes(x, finest = TRUE).- timeframe
A timeframe name (see
calendar_timeframes()).
Value
calendar_timeframes() and calendar_timeslices() return a
character vector; calendar_rank() an integer.
Details
calendar_timeframes()— hierarchy names, coarsest first.calendar_rank()— position of a timeframe (1 = coarsest);NAfor unknown names.calendar_timeslices()— with atimeframe, its members in canonical order: the nodes of the hierarchy at that timeframe (m01atMONTH,m01_h00atHOUR), which are the leaf timeslices ofprune_calendar(x, timeframe). Without, the leaf timeslices.names()on a Calendar returns the timeframe names (identical tocalendar_timeframes()), NOT the leaftable column names.
