powered by
Create Event Mapping
create_event_mapping(events, start_time, end_time, max_row_number)
List of mapped events.
Data frame containing the start and end index of each event.
Name of the column in events containing the start index of the events.
Name of the column in events containing the end index of the events.
Number of rows in the source vector the events describe
Enumerate a vector to identify which event each measurement belongs to.
events <- data.frame( "start" = c(1, 5, 10, 15), "end" = c(4, 9, 14, 19) ) time_series <- rnorm(25) period_number <- create_event_mapping(events, "start", "end", length(time_series))
Run the code above in your browser using DataLab