View source: R/addDemographics.R
| addPriorObservation | R Documentation |
Compute the number of days of prior observation in the current observation period at a certain date
addPriorObservation(
x,
indexDate = "cohort_start_date",
priorObservationName = "prior_observation",
priorObservationType = "days",
name = NULL,
type = "numeric"
)
x |
A table containing individuals in a CDM reference. |
indexDate |
Name of a date column in |
priorObservationName |
Name of the prior-observation column to add. |
priorObservationType |
Whether to return a |
name |
Name of the new table. If |
type |
Type of the created column(s). Counts, days, age, and observation
durations can be |
cohort table with added column containing prior observation of the individuals.
library(PatientProfiles)
cdm <- mockPatientProfiles(source = "duckdb")
cdm$cohort1 |>
addPriorObservation()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.