% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vintages.R
\name{obr_pin}
\alias{obr_pin}
\title{Pin a session-wide OBR EFO vintage}
\usage{
obr_pin(vintage = NULL)
}
\arguments{
\item{vintage}{Vintage label such as \code{"October 2024"}. See
\code{\link[=obr_efo_vintages]{obr_efo_vintages()}} for the full list. A well-formed label that is not
yet in the package's EFO calendar (e.g. a brand-new EFO published after
this package version was released) is accepted with a warning: download
URLs are then constructed from the OBR's slug convention, so a new EFO
can be pinned on publication day. If \code{NULL}, this function clears
the pin (equivalent to calling \code{\link[=obr_unpin]{obr_unpin()}}).}
}
\value{
Invisibly returns the pinned vintage string, or \code{NULL} after
clearing.
}
\description{
Sets the EFO vintage that \code{\link[=get_efo_fiscal]{get_efo_fiscal()}} and \code{\link[=get_efo_economy]{get_efo_economy()}} will
use when called without an explicit \verb{vintage =} argument. The pin is stored
as the option \code{obr.efo_vintage} and lasts for the R session unless
overwritten or removed via \code{\link[=obr_unpin]{obr_unpin()}}.
}
\examples{
\donttest{
op <- options(obr.cache_dir = tempdir())
try({
  obr_pin("October 2024")
  obr_pinned()
  obr_unpin()
})
options(op)
}

}
\seealso{
Other vintage: 
\code{\link{obr_as_of}()},
\code{\link{obr_efo_vintages}()},
\code{\link{obr_pinned}()},
\code{\link{obr_unpin}()}
}
\concept{vintage}
