Combine events with overlapping start/end dates.
stockpile_events(events, states = NULL, gap = 1L, id_var = "patient_id")
Events of interest in the data. If NULL, assume all events are of interest.
Gap (in days) to apply in prescriptions of the same type. Useful when the gap should
only apply to link together identical states (if the allowable gap is to be applied universally, can be
end prior to using the function)
Group identifier in the data. Default is