# walktrap.community

From igraph v0.4.4
by Gabor Csardi

##### Community strucure via short random walks

This function tries to find densely connected subgraphs, also called communities in a graph via random walks. The idea is that short random walks tend to stay in the same community.

##### Usage

```
walktrap.community(graph, weights = E(graph)$weight, steps = 4, merges =
TRUE, modularity = FALSE, labels = TRUE)
```

##### Arguments

- graph
- The input graph.
- weights
- The edge weights.
- steps
- The length of the random walks to perform.
- merges
- Logical scalar, whether to include the merge matrix in the result.
- modularity
- Logical scalar, whether to include the vector of the modularity scores in the result.
- labels
- Logical scalar, if
`TRUE`

and the graph has a vertex attribute called`name`

then it will be included in the result, in the list member called`labels`

.

##### Details

This function is the implementation of the Walktrap community finding algorithm, see Pascal Pons, Matthieu Latapy: Computing communities in large networks using random walks, http://arxiv.org/abs/physics/0512106

##### Value

- A named list with two members:
- merges

n communities (the number of vertices in the graph) numbered from zero to n-1. The first merge created community n, the second community n+1, etc. - membership
{ Numeric vector, the modularity score of the current community structure after each merge operation. }- labels
{The labels of the vertices in the graph. The`name`

vertex attribute will be copied here, if exists. }Pascal Pons, Matthieu Latapy: Computing communities in large networks using random walks, http://arxiv.org/abs/physics/0512106 [object Object],[object Object],[object Object]`modularity`

and`fastgreedy.community`

,`spinglass.community`

,`leading.eigenvector.community`

,`edge.betweenness.community`

for other community detection methods.g <- graph.full(5) %du% graph.full(5) %du% graph.full(5) g <- add.edges(g, c(0,5, 0,10, 5, 10)) walktrap.community(g) graphs

*Documentation reproduced from package igraph, version 0.4.4, License: GPL version 2 or later (June, 1991)*

### Community examples

Looks like there are no examples yet.