cluster.RdColor nodes by cluster.
sg_cluster(sg, colors = c("#B1E2A3", "#98D3A5", "#328983", "#1C5C70", "#24C96B"), directed = TRUE, algo = igraph::cluster_walktrap, quiet = !interactive(), save_igraph = TRUE, ...) sg_get_cluster(nodes, edges, colors = c("#B1E2A3", "#98D3A5", "#328983", "#1C5C70", "#24C96B"), directed = TRUE, algo = igraph::cluster_walktrap, quiet = !interactive(), save_igraph = TRUE, ...)
| sg | An object of class |
|---|---|
| colors | Palette to color the nodes. |
| directed | Whether or not to create a directed graph, passed to |
| algo | An |
| quiet | Set to |
| save_igraph | Whether to save the |
| ... | Any parameter to pass to |
| nodes, edges | Nodes and edges as prepared for sigmajs. |
sg_get_cluster returns nodes with color variable.
The package uses igraph internally for a lot of computations the save_igraph
allows saving the object to speed up subsequent computations.
sg_cluster Color nodes by cluster.
sg_get_cluster helper to get graph's nodes color by cluster.
#> Warning: Argument `n` is deprecated