% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/collect.R
\name{collect_baseline}
\alias{collect_baseline}
\title{Count number of subjects}
\usage{
collect_baseline(
  meta,
  population,
  parameter,
  type = "Subjects",
  use_na = c("ifany", "no", "always"),
  display_total = TRUE
)
}
\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{parameter}{A character value of parameter term name.
The term name is used as key to link information.}

\item{type}{A character value to control title name,
e.g., Subjects or Records.}

\item{use_na}{A character value for whether to include \code{NA} values
in the table. See the \code{useNA} argument in \code{\link[base:table]{base::table()}} for more details.}

\item{display_total}{A logical value to display total column.}
}
\value{
A list containing number of subjects
}
\description{
Count number of subjects
}
\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"
  )) |>
  metalite::define_population(
    name = "apat",
    group = "TRTA",
    subset = SAFFL == "Y"
  ) |>
  metalite::define_parameter(
    name = "age",
    var = "AGE",
    label = "Age (years)",
    vargroup = "AGEGR1"
  ) |>
  metalite::define_analysis(
    name = "base_char",
    title = "Participant Baseline Characteristics by Treatment Group"
  ) |>
  metalite::meta_build()

meta |> collect_baseline(
  population = "apat",
  parameter = "age"
)
}
