rules2timebins | R Documentation |
Converts a list of human readable rules to a functional that maps any datetime stamp to a time bin.
rules2timebins(rules)
rules |
A list of lists of rules, each sublist must contain 4 variables, |
Unassigned time is by default tagged with Other
a function that maps any datetime stamp to the associated time bins.
## Not run: rules = list( list(start='6:30', end= '9:00', days = 1:5, tag='MR'), list(start='15:00', end= '18:00', days = 2:5, tag='ER') ) time_bins <- rules2timebins(rules) time_bins(Sys.time()) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.