% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sequence-consensus-groups.R
\name{summarise_consensus_agreement}
\alias{summarise_consensus_agreement}
\title{Summarise consensus agreement}
\usage{
summarise_consensus_agreement(
  consensus,
  by = c("overall", "group", "position"),
  threshold = 0.5
)
}
\arguments{
\item{consensus}{A result from \code{\link[=create_consensus_sequence]{create_consensus_sequence()}}.}

\item{by}{Summary level: \code{"overall"}, \code{"group"}, or \code{"position"}.}

\item{threshold}{Agreement threshold used to count low-agreement positions.}
}
\value{
A data frame with position counts, mean, median, minimum and maximum
agreement, weighted agreement, tie counts, and low-agreement counts.
}
\description{
Summarise consensus agreement
}
\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
)
consensus <- create_consensus_sequence(sequences)
summarise_consensus_agreement(consensus)

}
