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 |
A table containing individuals in a CDM reference. |
targetCohortTable |
Name of the cohort table to intersect with. |
targetCohortId |
Cohort definition IDs to include from
|
indexDate |
Name of a date column in |
censorDate |
Date or name of a date column in |
targetDate |
Name or names of date columns in the target tables to use for the intersection. |
order |
Which record to use when multiple records occur in a window:
|
window |
Window or windows of time relative to |
nameStyle |
Naming pattern for the added column or columns. It should
include the required formatting variables. If more than one |
name |
Name of the new table. If |
x along with additional columns for each cohort of interest.
library(PatientProfiles)
cdm <- mockPatientProfiles(source = "duckdb")
cdm$cohort1 |>
addCohortIntersectDate(targetCohortTable = "cohort2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.