Description Usage Arguments Value
Create a sliding window iterator generator
1 | inclusive_window_gen(sorted_times, interval = minutes(5), skip = 1)
|
sorted_times |
a vector of date-times in ascending order. |
interval |
a time interval. The default is minutes(5). |
skip |
elements on the interval. |
an iterator that, when called with nextElem returns the indices in the next window. data(aapl_fix) aapl_fix$dt_string = paste(aapl_fix$sys_date, aapl_fix$sys_time) aapl_fix$dt = strptime(aapl_fix$dt_string, " it = inclusive_window_gen(aapl_fix$dt) window1 = nextElem(it) aapl_fix$dt[c(window1[1], tail(window1, 1)] window2 = nextElem(it) aapl_fix$dt[c(window2[1], tail(window2, 1)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.