View source: R/netcarto_modules.R
netcarto_modules | R Documentation |
Convenience function to extract a membership vector using the netcarto community detection algorithm.
netcarto_modules(x)
x |
a named square adjacency matrix or named 'igraph' graph. Intended for weighted, undirected graphs. |
a named vector of module memberships matching the named adjacency matrix or igraph graph object (igraph::V(graph)$name)
adjmat <- matrix(sample(seq(0, 1, .01), 16), nrow = 4) diag(adjmat) <- 0 adjmat[lower.tri(adjmat)] <- 0 rownames(adjmat) <- colnames(adjmat) <- paste0("Animal_", 1:4) netcarto_modules(adjmat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.