Learn R Programming

PatientProfiles (version 1.4.2)

filterInObservation: Filter the rows of a `cdm_table` to the ones in observation that `indexDate` is in observation.

Description

Filter the rows of a `cdm_table` to the ones in observation that `indexDate` is in observation.

Usage

filterInObservation(x, indexDate)

Value

A `cdm_table` that is a subset of the original table.

Arguments

x

A `cdm_table` object.

indexDate

Name of a column of x that is a date.

Examples

Run this code
if (FALSE) {
con <- duckdb::dbConnect(duckdb::duckdb(CDMConnector::eunomiaDir()))
cdm <- CDMConnector::cdmFromCon(
  con = con, cdmSchema = "main", writeSchema = "main"
)

cdm$condition_occurrence |>
  filterInObservation(indexDate = "condition_start_date") |>
  dplyr::compute()
}

Run the code above in your browser using DataLab