Learn R Programming

CohortConstructor (version 0.2.2)

collapseCohorts: Collapse cohort entries using a certain gap to concatenate records.

Description

collapseCohorts() concatenates cohort records, allowing for some number of days between one finishing and the next starting.

Usage

collapseCohorts(cohort, cohortId = NULL, gap = 0, name = tableName(cohort))

Value

A cohort table

Arguments

cohort

A cohort table

cohortId

IDs of the cohorts to modify. If NULL, all cohorts will be used; otherwise, only the specified cohorts will be modified, and the rest will remain unchanged.

gap

Number of days to use when merging cohort entries.

name

Name of the cohort table.