Learn R Programming

GENEAcore (version 1.1.2)

create_event_mapping: Create Event Mapping

Description

Create Event Mapping

Usage

create_event_mapping(events, start_time, end_time, max_row_number)

Value

List of mapped events.

Arguments

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

Details

Enumerate a vector to identify which event each measurement belongs to.

Examples

Run this code
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