| expand_periods | R Documentation |
tibble of equally spaced time pointsExpand time periods into a tibble of equally spaced time points
expand_periods(periods, start_var, end_var, units = "1 min")
periods |
A |
start_var |
The variable (unquoted) which indicates when the time periods start. |
end_var |
The variable (unquoted) which indicates when the time periods end. |
units |
The time unit as a characters string. The default is |
A tibble with two columns: period_id identifies the input period
and timestamp is a POSIXct vector of time points within that period,
equally spaced by units. Any grouping of periods is preserved.
library("dplyr")
data("gtxplus1day")
gtxplus1day %>%
collapse_epochs(60) %>%
apply_choi(min_period_len = 45) %>%
expand_periods(period_start, period_end, units = "30 mins")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.