Description Usage Arguments Details Value See Also Examples
View source: R/date_to_triangle.R
Use dates of events and dates of birth to create one-quarter (three-month) Lexis triangles.
1 | date_to_triangle_quarter(date, dob)
|
date |
Dates of events.
A vector of class |
dob |
Dates of birth.
A vector of class |
See vignette("demprep")
for the definition
of Lexis triangles.
date
and dob
must have the same length,
unless one of them has length 1, in which case the
length-1 argument is recycled.
A character vector with the same length as date
.
The output from date_to_triangle_quarter
is often processed further using function
format_triangle_quarter
.
Other functions for creating
triangles from dates are
date_to_triangle_year
and date_to_triangle_month
.
Other functions for creating one-quarter
units from dates are
date_to_age_quarter
.
date_to_period_quarter
, and
date_to_cohort_quarter
.
1 2 3 | date_to_triangle_quarter(date = c("2024-03-27",
"2022-11-09"),
dob = "2020-01-01")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.