| 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,
ageUnit = "years",
name = NULL
)
x |
A table containing individuals in a CDM reference. |
birthday |
Day of birth to add. |
birthdayName |
Name of the birthday column 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: |
name |
Name of the new table. If |
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.