| addBirthdayQuery | R Documentation |
Same as
addBirthday(), except query is not computed to a table.
The function accounts for leap years and corrects the invalid dates to the next valid date.
addBirthdayQuery(
x,
birthdayName = "birthday",
birthday = 0,
ageMissingMonth = 1,
ageMissingDay = 1,
ageImposeMonth = FALSE,
ageImposeDay = FALSE
)
x |
Table with individuals in the cdm. |
birthdayName |
Birth day variable name. |
birthday |
Number of birth day. |
ageMissingMonth |
Month of the year assigned to individuals with missing month of birth. |
ageMissingDay |
day of the month assigned to individuals with missing day of birth. |
ageImposeMonth |
TRUE or FALSE. Whether the month of the date of birth will be considered as missing for all the individuals. |
ageImposeDay |
TRUE or FALSE. Whether the day of the date of birth will be considered as missing for all the individuals. |
The table with a query that add the new column containing the birth day.
library(PatientProfiles)
library(dplyr)
cdm <- mockPatientProfiles(source = "duckdb")
cdm$cohort1 |>
addBirthdayQuery() |>
glimpse()
cdm$cohort1 |>
addBirthdayQuery(birthday = 5) |>
glimpse()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.