Collapse records of a cdm_table into episodes.
Usage
collapseRecords(
x,
startDate,
endDate,
by,
gap = 0L,
toSummarise = character(),
name = NULL
)Arguments
- x
A
cdm_tableobject.- startDate
Column in
xthat points to the start date of the record.- endDate
Column in
xthat point to the end date of the record.- by
Columns in
xthat aggregate the records.- gap
Integer; distance allowed between two consecutive records to be collapsed.
- toSummarise
Columns in x that we want to be keep, the different columns will be added up.
- name
Name of the new
cdm_tablecreated.