% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clustering.R
\name{calcMembership}
\alias{calcMembership}
\title{Calculate cluster memberships for the graph.}
\usage{
calcMembership(
  gg,
  alg = c("lec", "wt", "fc", "infomap", "louvain", "sgG1", "sgG2", "sgG5", "spectral")
)
}
\arguments{
\item{gg}{igraph object to cluster}

\item{alg}{algorithm name}
}
\value{
data.frame with columns \code{names} and \code{membership}
}
\description{
Calculates the clustering membership for each of the 10 clustering algorithms
defined in function \code{\link{getClustering}}
}
\examples{
data(karate, package='igraphdata')
m<-calcMembership(karate, 'lec')
head(m)
}
\seealso{
getClustering
}
