% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/communities.R
\name{compare_communities}
\alias{compare_communities}
\title{Compare Community Structures}
\usage{
compare_communities(
  comm1,
  comm2,
  method = c("vi", "nmi", "split.join", "rand", "adjusted.rand")
)
}
\arguments{
\item{comm1}{First community structure (communities object or membership vector)}

\item{comm2}{Second community structure (communities object or membership vector)}

\item{method}{Comparison method: "vi" (variation of information),
"nmi" (normalized mutual information), "split.join",
"rand" (Rand index), "adjusted.rand"}
}
\value{
Numeric similarity/distance value
}
\description{
Compares two community structures using various similarity measures.
}
\examples{
if (requireNamespace("igraph", quietly = TRUE)) {
  g <- igraph::make_graph("Zachary")
  c1 <- community_louvain(g)
  c2 <- community_leiden(g)
  compare_communities(c1, c2, "nmi")
}
}
