| 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,
ageUnit = "years"
)
x |
A table containing individuals in a CDM reference. |
birthdayName |
Name of the birthday column to add. |
birthday |
Day of birth to add. |
ageMissingMonth |
Month of the year assigned when month of birth is missing. |
ageMissingDay |
Day of the month assigned when day of birth is missing. |
ageImposeMonth |
If |
ageImposeDay |
If |
ageUnit |
Unit in which to express age: |
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.