age.Rd
Calculates age in years based on a reference date, which is the sytem date at default.
age(x, reference = Sys.Date())
x | date(s), will be coerced with |
---|---|
reference | reference date(s) (defaults to today), will be coerced with |
Integer (no decimals)
On our website https://msberends.gitlab.io/AMR you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.
age_groups
to split age into age groups
# NOT RUN { df <- data.frame(birth_date = Sys.Date() - runif(100) * 25000) df$age <- age(df$birth_date) # }