View source: R/addCohortIntersect.R
addCohortIntersectDate | R Documentation |
Date of cohorts that are present in a certain window
addCohortIntersectDate(
x,
targetCohortTable,
targetCohortId = NULL,
indexDate = "cohort_start_date",
censorDate = NULL,
targetDate = "cohort_start_date",
order = "first",
window = c(0, Inf),
nameStyle = "{cohort_name}_{window_name}",
name = NULL
)
x |
Table with individuals in the cdm. |
targetCohortTable |
Cohort table to. |
targetCohortId |
Cohort IDs of interest from the other cohort table. If NULL, all cohorts will be used with a time variable added for each cohort of interest. |
indexDate |
Variable in x that contains the date to compute the intersection. |
censorDate |
whether to censor overlap events at a specific date or a column date of x. |
targetDate |
Date of interest in the other cohort table. Either cohort_start_date or cohort_end_date. |
order |
date to use if there are multiple records for an individual during the window of interest. Either first or last. |
window |
Window of time to identify records relative to the indexDate. Records outside of this time period will be ignored. |
nameStyle |
naming of the added column or columns, should include required parameters. |
name |
Name of the new table, if NULL a temporary table is returned. |
x along with additional columns for each cohort of interest.
cdm <- mockPatientProfiles()
cdm$cohort1 %>%
addCohortIntersectDate(
targetCohortTable = "cohort2"
)
mockDisconnect(cdm = cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.