% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prepare_disposition.R
\name{prepare_disposition}
\alias{prepare_disposition}
\title{Prepare data for treatment compliance table}
\usage{
prepare_disposition(
  meta,
  analysis = "disp",
  population = meta$plan[meta$plan$analysis == analysis, ]$population,
  parameter = paste(meta$plan[meta$plan$analysis == analysis, ]$parameter, collapse =
    ";")
)
}
\arguments{
\item{meta}{A metadata object created by metalite.}

\item{analysis}{A character value of analysis term name.
The term name is used as key to link information.}

\item{population}{A character value of population term name.
The term name is used as key to link information.}

\item{parameter}{A character value of parameter term name.
The term name is used as key to link information.}
}
\value{
A list of analysis raw datasets.
}
\description{
Prepare data for treatment compliance table
}
\examples{
meta <- metalite::meta_adam(
  population = metalite_sl_adsl,
  observation = metalite_sl_adsl
) |>
  metalite::define_plan(metalite::plan(
    analysis = "disp",
    population = "apat",
    observation = "apat",
    parameter = "disposition;medical-disposition"
  )) |>
  metalite::define_population(
    name = "apat",
    group = "TRTA",
    subset = SAFFL == "Y"
  ) |>
  metalite::define_parameter(
    name = "disposition",
    var = "EOSSTT",
    label = "Trial Disposition",
    var_lower = "DCSREAS"
  ) |>
  metalite::define_parameter(
    name = "medical-disposition",
    var = "EOTSTT",
    label = "Participant Study Medication Disposition",
    var_lower = "DCTREAS"
  ) |>
  metalite::define_analysis(
    name = "disp",
    title = "Disposition of Participant"
  ) |>
  metalite::meta_build()

meta |> prepare_disposition()
}
