View source: R/addDemographics.R
addFutureObservation | R Documentation |
Compute the number of days till the end of the observation period at a certain date
addFutureObservation(
x,
indexDate = "cohort_start_date",
futureObservationName = "future_observation",
futureObservationType = "days",
name = NULL
)
x |
Table with individuals in the cdm. |
indexDate |
Variable in x that contains the date to compute the future observation. |
futureObservationName |
name of the new column to be added. |
futureObservationType |
Whether to return a "date" or the number of "days". |
name |
Name of the new table, if NULL a temporary table is returned. |
cohort table with added column containing future observation of the individuals.
cdm <- mockPatientProfiles()
cdm$cohort1 %>%
addFutureObservation()
mockDisconnect(cdm = cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.