Description Usage Arguments Details Examples
View source: R/plot_date_to_cohort.R
Create a plot illustrating how function
date_to_cohort_year
works.
1 | plot_date_to_cohort_year(date, month_start = "Jan", label_year_start = TRUE)
|
date |
Dates of events or measurements. |
month_start |
An element of |
label_year_start |
Whether to label a cohort
by the calendar year at the beginning of the cohort
or the calendar year at the end. Not needed for cohorts
that start on 1 January. Defaults to |
plot_date_to_cohort_year
is typically used for
learning or documentation, rather than for
actual data analysis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | plot_date_to_cohort_year(date = c("2024-03-27",
"2022-11-09"))
## starts on 1 July rather than 1 January
plot_date_to_cohort_year(date = c("2024-03-27",
"2022-11-09"),
month_start = "Jul")
## starts on 1 July rather than 1 January,
## and uses calendar year at end rather than
## calendar year at the beginning
plot_date_to_cohort_year(date = c("2024-03-27",
"2022-11-09"),
month_start = "Jul",
label_year_start = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.