% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/z_resolve.R
\name{resolve_includes}
\alias{resolve_includes}
\title{Resolve conditional metadata items}
\usage{
resolve_includes(x, info = list())
}
\arguments{
\item{x}{A \link{mighty_study} or \link{mighty_domain} object.}

\item{info}{\code{list()} Named list of values used to evaluate \code{include}
expressions. For \link{mighty_study}, merged into \code{x@study}.}
}
\value{
The input object with conditional items resolved.
}
\description{
Evaluates \code{include} fields on metadata items (domains, columns, rows, parameters)
and removes items where the condition evaluates to \code{FALSE}.
}
\details{
Include conditions are R expressions with \code{{glue}} syntax for variable
substitution and evaluation. The \code{info} list provides the values used
to do this.
}
\examples{
study <- mighty_study(
  path = system.file("examples", package = "mighty.metadata")
)

# Add a conditional column
study$ADVS <- update_column(
  study$ADVS,
  id = "STUDYID",
  include = "{study_id == 'my_study'}"
)

# Condition TRUE: column kept (study_id is "my_study" in @study)
study |>
  resolve_includes() |>
  getElement("ADVS") |>
  list_columns()

# Condition FALSE: column removed
study |>
  resolve_includes(info = list(study_id = "other")) |>
  getElement("ADVS") |>
  list_columns()

}
