This funciton leverages the 'lambda.r' library to create Event types comprised of a list of quosures to make referencing data sources and elements easy with rlang::eval_tidy().

Arguments

data

(formula) A formula, where the LHS (if given) becomes the event label when argument label is not provided. The RHS becomes a reference to the source data by name. If a pipe (`|`) is given after the data source name on the RHS, it is treated as an indication of an expression that will filter rows in the data when evaluated.

jk, start, end(string)

The name of the element in data denoting the 'join-key', 'start', and 'end' respectively.

label

A unique label for the event source

Value

a list comprised of the event label and three quosures (jk, time_start_idx, time_end_idx)