% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-scenarios.R
\name{get_baseline_year}
\alias{get_baseline_year}
\title{Get last year from baseline}
\usage{
get_baseline_year(
  year,
  type,
  scenario_col = NULL,
  scenario = NULL,
  baseline_year,
  type_filter = c("all", "reported", "estimated", "projected", "imputed"),
  direction = c("before", "after"),
  na_rm = TRUE
)
}
\arguments{
\item{year}{(character vector) of years.}

\item{type}{(character vector) of years. Must be the same length as \code{year}}

\item{scenario_col}{(character vector) of scenarios. Must be the same length as \code{value}}

\item{scenario}{name of scenario in which to look for the baseline value}

\item{baseline_year}{Year integer at which to get the baseline_value}

\item{type_filter}{(character vector) vector of types to be filtered for.}

\item{direction}{direction in which the last value should be found. \code{before}
(default) looks in years before \code{baseline_year}, while \code{after} looks in years
following \code{baseline_year}.}

\item{na_rm}{(Boolean) indicating if NA should be removed (default) from \code{type_filter}
or not.}
}
\description{
Get last year from baseline
}
\seealso{
General scenario functions
\code{\link{add_scenario}()},
\code{\link{calculate_aarc}()},
\code{\link{calculate_aroc}()},
\code{\link{exec_scenario}()},
\code{\link{fill_cols_scenario}()},
\code{\link{flat_extrapolation}()},
\code{\link{get_aarr}()},
\code{\link{get_baseline_value}()},
\code{\link{get_last_value}()},
\code{\link{get_last_year_scenario}()},
\code{\link{get_latest_aarc}()},
\code{\link{get_percent_change_aarc}()},
\code{\link{get_target_aarc}()},
\code{\link{remove_unwanted_scenarios}()},
\code{\link{trim_values}()},
\code{\link{trim_years}()}
}
\concept{scenarios}
\keyword{internal}
