OECD
OECD copied to clipboard
Filter by name of variable and not just order
I might be misunderstanding, but it looks like the order of filters are applied to the variables in strict order, so (from the vignette):
df <- get_dataset(dataset = "DUR_D", filter = list(c("DEU", "FRA"), "MW", "2024"))
works, but if I only want to apply the last filter I have to write
df <- get_dataset(dataset = "DUR_D", filter = list(NULL, NULL, "2024"))
What would be nice is to use the names() of the filter list to avoid having to type this, e.g.
df <- get_dataset(dataset = "DUR_D", filter = list(AGE = "2024"))
It doesn't seem like this would be too hard, I guess it would require a call to get_data_structure()
to get the order right.
You could even match arguments in ... so that a call could look like:
df <- get_dataset(dataset = "DUR_D", AGE = "2024")