% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sequence-consensus-groups.R
\name{plot_sequence_group_comparison}
\alias{plot_sequence_group_comparison}
\title{Plot a descriptive sequence-group comparison}
\usage{
plot_sequence_group_comparison(
  comparison,
  component = c("state", "transition", "length"),
  measure = NULL,
  top_n = 12L,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  ...
)
}
\arguments{
\item{comparison}{A result from \code{\link[=compare_sequence_groups]{compare_sequence_groups()}}.}

\item{component}{\code{"state"}, \code{"transition"}, or \code{"length"}.}

\item{measure}{Measure to display. Defaults depend on \code{component}.}

\item{top_n}{Maximum states or transitions to display.}

\item{main, xlab, ylab}{Plot labels.}

\item{...}{Additional base-graphics arguments.}
}
\value{
The plotted summary data, invisibly.
}
\description{
Plot a descriptive sequence-group comparison
}
\examples{
sequences <- data.frame(
  sequence_id = rep(c("s1", "s2", "s3", "s4"), each = 4L),
  sequence_order = rep(1:4, times = 4L),
  state = c("A", "B", "C", "D", "A", "B", "C", "C",
            "D", "C", "B", "A", "D", "C", "A", "A"),
  group = rep(c("g1", "g2"), each = 8L),
  stringsAsFactors = FALSE
)
comparison <- compare_sequence_groups(sequences, group_col = "group")
plot_sequence_group_comparison(comparison, component = "state")

}
