Skip to contents

Sets the EFO vintage that get_efo_fiscal() and get_efo_economy() will use when called without an explicit vintage = argument. The pin is stored as the option obr.efo_vintage and lasts for the R session unless overwritten or removed via obr_unpin().

Usage

obr_pin(vintage = NULL)

Arguments

vintage

Vintage label such as "October 2024". See obr_efo_vintages() for the full list. If NULL, this function clears the pin (equivalent to calling obr_unpin()).

Value

Invisibly returns the pinned vintage string, or NULL after clearing.

Examples

# \donttest{
op <- options(obr.cache_dir = tempdir())
obr_pin("October 2024")
#>  Pinned EFO to "October 2024".
obr_pinned()
#> [1] "October 2024"
obr_unpin()
#>  Unpinned EFO (was "October 2024").
options(op)
# }