validate_time_window | R Documentation |
Make sure the time windows are valid intervals and returns a reshaped window list
validate_time_window(time_windows)
time_windows |
vectors or a list of time intervals |
A list of time intervals (ordered, length of 2)
# Simple time window
validate_time_window(c(-1, 2))
# Multiple windows
validate_time_window(c(-1, 2, 3, 5))
# alternatively
validate_time_window(list(c(-1, 2), c(3, 5)))
validate_time_window(list(list(-1, 2), list(3, 5)))
## Not run:
# Incorrect usage (will raise errors)
# Invalid interval (length must be two for each intervals)
validate_time_window(list(c(-1, 2, 3, 5)))
# Time intervals must be in ascending order
validate_time_window(c(2, 1))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.