Skip to contents

Reports the reference period the bundled PLIDA registry declares for a dataset, as a vector of years. Every year-aware generator narrows its years argument to this before generating, so a build never writes a product year that does not exist in PLIDA.

Usage

plida_dataset_years(dataset)

Arguments

dataset

Character. One dataset, named either as the registry writes it ("TVA", "PIT_PS", "A&T") or as build_fplida() names the product ("tva", "pit_ps", "apprentice"). Case does not matter.

Value

An integer vector of years, sorted. NULL when the dataset declares no period – an unknown name, the spine, or BLADE, whose periods are per table. NULL means unrestricted, never "no years".

Details

Years are calendar years for calendar-year datasets and financial-year END years for financial-year datasets, matching what the generators' years arguments already mean. PIT_PS covering the 2001-02 to 2022-23 financial years therefore returns 2002:2023.

A period written as "... to current" is closed at 2026, the end of the newest financial year any bundled metadata declares. The value is fixed, not read from the system clock, so the same build gives the same answer next year.

See also

plida_dataset_periods() for every dataset at once.

Examples

plida_dataset_years("TVA")
#> [1] 2015 2016 2017 2018 2019 2020 2021 2022 2023
plida_dataset_years("pit_ps")
#>  [1] 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
#> [16] 2017 2018 2019 2020 2021 2022 2023
plida_dataset_years("CENSUS")
#> [1] 2011 2016 2021