% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/communities.R
\name{community_infomap}
\alias{community_infomap}
\alias{com_im}
\title{Infomap Community Detection}
\usage{
community_infomap(
  x,
  weights = NULL,
  v.weights = NULL,
  nb.trials = 10,
  modularity = TRUE,
  seed = NULL,
  ...
)

com_im(
  x,
  weights = NULL,
  v.weights = NULL,
  nb.trials = 10,
  modularity = TRUE,
  seed = NULL,
  ...
)
}
\arguments{
\item{x}{Network input}

\item{weights}{Edge weights for transitions. NULL uses network weights.}

\item{v.weights}{Vertex weights (teleportation weights).}

\item{nb.trials}{Number of optimization trials. Default 10.}

\item{modularity}{Logical; calculate modularity? Default TRUE.}

\item{seed}{Random seed for reproducibility. Default NULL.}

\item{...}{Additional arguments passed to \code{\link{to_igraph}}}
}
\value{
A \code{cograph_communities} object

A \code{cograph_communities} object. See \code{\link{detect_communities}}.
}
\description{
Information-theoretic community detection based on random walk dynamics.
Minimizes the map equation (description length of random walks).
}
\examples{
if (requireNamespace("igraph", quietly = TRUE)) {
  g <- igraph::make_graph("Zachary")
  comm <- community_infomap(g, nb.trials = 20)
}
}
\references{
Rosvall, M., & Bergstrom, C.T. (2008).
Maps of random walks on complex networks reveal community structure.
\emph{PNAS}, 105(4), 1118-1123.
}
