% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sampling.R
\name{getCommunityGraph}
\alias{getCommunityGraph}
\title{Create new graph with communities as a nodes.}
\usage{
getCommunityGraph(gg, membership)
}
\arguments{
\item{gg}{graph to convert}

\item{membership}{participation list for new graph}
}
\value{
community graph
}
\description{
The idea based upon
\href{https://shorturl.at/flv35}{this StackOverflow answer}
}
\examples{
data(karate,package='igraphdata')
alg<-'louvain'
mem<-calcMembership(karate,alg = alg)
cg<-getCommunityGraph(karate,mem$membership)
}
