View source: R/splitByBranches.R
splitByBranches | R Documentation |
Split a graph (usually a MST, at least a DAG) into branch-free components, i.e., paths between branch points or terminal nodes.
splitByBranches(g)
g |
A graph object such as that produced by |
This function implements another strategy to define paths through the MST,
by simply considering all linear sections (i.e., connected by nodes of degree 2) between branch points or terminii.
The idea is to enable characterisation of the continuum without external information or assumptions statements about where the root is positioned,
which would otherwise be required in functions such as defineMSTPaths
.
A list of character vectors containins unbranched paths between branch points or terminal nodes.
Aaron Lun
defineMSTPaths
, for the root-based method of defining paths.
library(igraph)
test.g <- make_graph(c("A", "B", "B", "C", "C", "D",
"D", "E", "D", "F", "F", "G"), directed=FALSE)
splitByBranches(test.g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.