View source: R/aggregate_periods.R
createEventMapping | R Documentation |
Create Event Mapping
createEventMapping(events, start_time, end_time, max_row_number)
events |
Data frame containing the start and end index of each event. |
start_time |
Name of the column in events containing the start index of the events. |
end_time |
Name of the column in events containing the end index of the events. |
max_row_number |
Number of rows in the source vector the events describe |
Enumerate a vector to identify which event each measurement belongs to.
List of mapped events.
events <- data.frame(
"start" = c(1, 5, 10, 15),
"end" = c(4, 9, 14, 19)
)
time_series <- rnorm(25)
period_number <- createEventMapping(events, "start", "end", length(time_series))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.