An R package for community detection on (connected, undirected, simple) networks. Makes use of the igraph R package. If the network edges contain weights they will be ignored.
Clone or download this repo and install in R with:
install.packages("/path/to/package/redwalk.zip", repos = NULL, type = "source")
or using the devtools package:
devtools::install_github("barrpet/redwalk")
Following the igraph package convention for community detection functions, a
heirarchal clustering (returning a hclust
object) can be obtained with:
cluster_redwalk(graph, nodes = V(graph), short_paths = NULL)
graph
can be either an igraph object or a |E|x2 matrix representing the
undirected edges of a graph. It is reccomended that the shortest path lengths be
passed to the functions or they will be computed every time. A function for
shortest path lengths is provided by the package which is more efficient than
the igraph function for unweighted, undirected graphs:
shortest_path_lengths(graph, nodes = V(graph))
Peter S. Barr* - barrps12@wfu.edu
Dr. Kenneth Berenhaut - berenhks@wfu.edu
Alyssa M. Kogel - kogeam11@wfu.edu
* package author and maintainer
MIT
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.