| addBirthday | R Documentation |
The function accounts for leap years and corrects the invalid dates to the next valid date.
addBirthday(
x,
birthday = 0,
birthdayName = "birthday",
ageMissingMonth = 1L,
ageMissingDay = 1L,
ageImposeMonth = FALSE,
ageImposeDay = FALSE,
name = NULL
)
x |
Table with individuals in the cdm. |
birthday |
Number of birth day. |
birthdayName |
Birth day variable name. |
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. |
name |
Name of the new table, if NULL a temporary table is returned. |
The table with a new column containing the birth day.
library(PatientProfiles)
library(dplyr)
cdm <- mockPatientProfiles(source = "duckdb")
cdm$cohort1 |>
addBirthday() |>
glimpse()
cdm$cohort1 |>
addBirthday(birthday = 5, birthdayName = "bithday_5th") |>
glimpse()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.