View source: R/addTableIntersect.R
| addTableIntersectDays | R Documentation |
Compute time to intersect with an omop table.
addTableIntersectDays(
x,
tableName,
indexDate = "cohort_start_date",
censorDate = NULL,
window = list(c(0, Inf)),
targetDate = startDateColumn(tableName),
inObservation = TRUE,
order = "first",
nameStyle = "{table_name}_{window_name}",
name = NULL,
type = "numeric"
)
x |
A table containing individuals in a CDM reference. |
tableName |
Names of one or more OMOP CDM tables to intersect with. |
indexDate |
Name of a date column in |
censorDate |
Date or name of a date column in |
window |
Window or windows of time relative to |
targetDate |
Name or names of date columns in the target tables to use for the intersection. |
inObservation |
If |
order |
Which record to use when multiple records occur in a window:
|
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 |
type |
Type of the created column(s). Counts, days, age, and observation
durations can be |
table with added columns with intersect information.
library(PatientProfiles)
cdm <- mockPatientProfiles(source = "duckdb")
cdm$cohort1 |>
addTableIntersectDays(tableName = "visit_occurrence")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.