This function computes the membership vector of the community
structure. To detect the community structure the user can choose one of the methods implemented
in igraph.
Returns a numeric vector, one number for each vertex in the graph;
the membership vector of the community structure.
Arguments
graph
The output of prepGraph.
method
The clustering method, one of "walktrap", "edgeBetweenness",
"fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap",
"optimal", "leiden","other".
...
additional parameters to use with any of the previous described
methods (see igraph package community detection methods for more details
i.e. cluster_walktrap)
FUN
in case the @method parameter is "other" there is the possibility
to use a personal function passing its name through this parameter.
The personal parameter has to take as input the @graph and the @weights
(that can be NULL), and has to return a community object.