Convert age from various units to days.
age_in_days.RdThis function takes an age input that can be in years, months, days, or as a combination of birthdate and date of assessment.
Arguments
- age
Numeric value representing the age.
- age_unit
(Optional) A character string specifying the unit of the input age ('years', 'months', 'days').
- dob
(Optional) The date of birth as a character string in the format 'YYYY-MM-DD'.
- date_assessed
(Optional) The date of assessment as a character string in the format 'YYYY-MM-DD'.