Convenience wrappers over as_timeframe() for the timeframes asked for
most often. Each returns an integer, and each needs the calendar the
timeslices belong to – the label text is never parsed.
Usage
tsl2hour(tsl, calendar)
tsl2yday(tsl, calendar)
tsl2month(tsl, calendar, year = NULL)
hour2HOUR(x, calendar = NULL)
yday2YDAY(x, calendar = NULL)Arguments
- tsl
Character vector of timeslice labels.
- calendar
A
Calendar, or the name of one ("d365_h24").- year
The year the timeslices fall in; see
as_timeframe().- x
Integer vector of timeframe values.
