Skip to contents

Collapse records of a cdm_table into episodes.

Usage

collapseRecords(x, startDate, endDate, by, gap = 0L, name = NULL)

Arguments

x

A cdm_table object.

startDate

Column in x that points to the start date of the record.

endDate

Column in x that point to the end date of the record.

by

Columns in x that aggregate the records.

gap

Integer; distance allowed between two consecutive records to be collapsed.

name

Name of the new cdm_table created.

Value

The x cdm_table with the records collapsed.