% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms-clinical.R
\name{geom_consort}
\alias{geom_consort}
\title{CONSORT participant flow diagram}
\usage{
geom_consort(mapping = NULL, data = NULL, box_fill = NULL, label_size = NULL)
}
\arguments{
\item{mapping, data}{Standard layer overrides. Map the stage label to
\code{label} and the participant count to \code{size}; map \code{x} to a stage index
to control ordering.}

\item{box_fill}{Box fill color.}

\item{label_size}{Text size in px.}
}
\value{
A \link{Layer} to add with \code{+}.
}
\description{
Boxes and arrows tracing participants from screening through analysis,
laid out automatically from a stage/count table.
}
\examples{
d <- data.frame(
  stage = c("Assessed for eligibility", "Randomised",
            "Received allocation", "Analysed"),
  n = c(420, 300, 291, 285)
)
ggnext(d, aes(label = stage, size = n)) + geom_consort()
}
