% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sequence-subsequences.R
\name{plot_sequence_subsequences}
\alias{plot_sequence_subsequences}
\title{Plot non-contiguous subsequence summaries}
\usage{
plot_sequence_subsequences(
  x,
  metric = "sequence_prevalence",
  top_n = 10L,
  decreasing = TRUE,
  ...
)
}
\arguments{
\item{x}{A summary or group-comparison table.}

\item{metric}{Numeric column to plot.}

\item{top_n}{Maximum number of subsequences.}

\item{decreasing}{Sort metric in decreasing order.}

\item{...}{Additional arguments passed to \code{\link[graphics:barplot]{graphics::barplot()}}.}
}
\value{
The plotted rows, invisibly.
}
\description{
Plot non-contiguous subsequence summaries
}
\examples{
data <- data.frame(sequence_id = rep(c("a", "b"), each = 4L),
                   sequence_order = rep(1:4, 2L),
                   state = c("A", "B", "C", "D", "A", "C", "B", "D"))
summary <- summarise_sequence_subsequences(extract_sequence_subsequences(data))
plot_sequence_subsequences(summary, top_n = 5L)
}
