% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scores_su_tlfb_sui_sdsu.R
\name{map_mid_years}
\alias{map_mid_years}
\title{Strategy for dealing with mid-year sessions}
\usage{
map_mid_years(data, algo = NULL)
}
\arguments{
\item{data}{tibble. A dataframe produced by \code{\link[=prepare_data_sdsu]{prepare_data_sdsu()}}.}

\item{algo}{character. Mapping algorithm to apply to mid‑year
sessions. Allowed values:
\itemize{
\item \code{"next_existing_fy"}: assign a mid year to the next existing full year.
If a participant ends with mid‑year visits, those terminal mid‑year
records are dropped.
\item \code{"next_potential_fy"}: assign a mid year to the next existing full year when
present, otherwise assign to the next forecasted full year
(that may never materialize).
\item \code{"next_immediate_fy"}: assign a mid year to the next full year regardless of
whether that full year record exists or not.
\item \code{"remove_my"}: drop mid-year events and keep only full-year events.
If \code{NULL} (default) no mapping is performed and \code{data} is returned unchanged.
}}
}
\value{
tibble. A tibble with \code{session_id} remapped or rows filtered.
}
\description{
Remove or map mid-year session records to full-year sessions according to a
chosen algorithm. Operations are performed per participant on data prepared
by \code{\link[=prepare_data_sdsu]{prepare_data_sdsu()}}.
}
\examples{
\dontrun{
map_mid_years(data, algo = "next_immediate_fy")
}
}
\keyword{internal}
