R/time_bins.R
rules2timebins.Rd
rules2timebins
converts a list of human readable rules to a functional that maps any datetime stamp to a time bin.
rules2timebins(rules)
A list of lists of rules, each sublist must contain 4 variables, start
and end
as the start and end times (24h format) of the time bin,
days
as a vector of days to apply this time bin to (1 for Sunday, ..., 7 for Saturday), and tag
as the name of the time bin.
A function that maps any datetime stamp to the associated time bins.
Unassigned time is by default tagged with Other