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

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

\item{analysis}{A character value of analysis 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 baseline characteristic table
}
\examples{
meta <- metalite::meta_adam(
  population = metalite_sl_adsl,
  observation = metalite_sl_adsl
) |>
  metalite::define_plan(metalite::plan(
    analysis = "base_char",
    population = "apat",
    observation = "apat",
    parameter = "age;gender;race"
  )) |>
  metalite::define_population(
    name = "apat",
    group = "TRTA",
    subset = SAFFL == "Y"
  ) |>
  metalite::define_parameter(
    name = "age",
    var = "AGE",
    label = "Age (years)",
    vargroup = "AGEGR1"
  ) |>
  metalite::define_parameter(name = "gender", var = "SEX", label = "Gender") |>
  metalite::define_parameter(name = "race", var = "RACE", label = "Race") |>
  metalite::define_analysis(
    name = "base_char",
    title = "Participant Baseline Characteristics by Treatment Group"
  ) |>
  metalite::meta_build()

meta |> prepare_sl_summary(population = "apat", analysis = "base_char")
}
