View source: R/addDemographicsQuery.R
| addAgeQuery | R Documentation |
Same as addAge(), except query is not computed to a table.
addAgeQuery(
x,
indexDate = "cohort_start_date",
ageName = "age",
ageGroup = NULL,
ageMissingMonth = 1,
ageMissingDay = 1,
ageImposeMonth = FALSE,
ageImposeDay = FALSE,
ageUnit = "years",
missingAgeGroupValue = "None",
type = "numeric"
)
x |
A table containing individuals in a CDM reference. |
indexDate |
Name of a date column in |
ageName |
Name of the age column to add. |
ageGroup |
If not |
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: |
missingAgeGroupValue |
Value to use when age is missing. |
type |
Type of the created column(s). Counts, days, age, and observation
durations can be |
tibble with the age column added.
library(PatientProfiles)
cdm <- mockPatientProfiles(source = "duckdb")
cdm$cohort1 |>
addAgeQuery()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.