subset_by_date | R Documentation |
Subset a dataset by date
subset_by_date(
x,
y = NULL,
date,
id_var = intersect(names(x), names(y)),
id_var.x = id_var,
id_var.y = id_var,
date_start_var = NA,
date_end_var = NA
)
x |
the dataset to subset |
y |
optional dataset containing information on a unit's start and end dates, must be set to NA if date information is contained in x |
date |
date to subset for in character 'YYYY-MM-DD' format |
id_var, |
id_var.x, id_var.y |
date_start_var |
composition start date variable name (must be part of either x or y) |
the input dataset subset to to all units for which date_start_var => date <= date_end_var
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.