Learn R Programming

expstudies (version 0.0.5)

addStart: Map transactions to exposure intervals

Description

This function takes in exposures and transactions and returns all transactions with a matching "key" and "trans_date" within an exposure interval and attaches the start date of the corresponding exposure interval. This is useful for grouping by start date and key, aggregating, and joining to the exposure rows. In this way premium pattern analysis can be performed.

Usage

addStart(trans, exposures)

Arguments

trans

Information we wish to assign to exposure intervals.

exposures

Output from addExposures(records).

Value

Modified transaction records that corresponding to an exposure interval, the interval start date is included.

Examples

Run this code
# NOT RUN {
addStart(trans, exposures)
# }

Run the code above in your browser using DataLab