% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms-clinical.R
\name{geom_shift}
\alias{geom_shift}
\title{Categorical shift plot}
\usage{
geom_shift(mapping = NULL, data = NULL, label = TRUE)
}
\arguments{
\item{mapping, data}{Standard layer overrides. Map the baseline category
to \code{x} and the follow-up category to \code{y}.}

\item{label}{Annotate cells with counts.}
}
\value{
A \link{Layer} to add with \code{+}.
}
\description{
How subjects move between categories from baseline to follow-up (lab
grade shifts, response categories), drawn as a counted tile grid.
}
\examples{
d <- data.frame(
  baseline = c("G0", "G0", "G1", "G1", "G2", "G0"),
  followup = c("G0", "G1", "G1", "G2", "G2", "G0")
)
ggnext(d, aes(baseline, followup)) + geom_shift()
}
