Description Usage Arguments Value See Also Examples
Returns a subset of the original graph (all edges and vertices that a directed path can take from from the root node. OrderN limits the growth of these paths.
1 | travOut(g, root, orderN = -1)
|
g |
igraph object |
root |
character string: name of root node |
orderN |
number: # of degrees away from root node to search. |
igraph object, subgragh of g
Simpler version: travCount
1 2 3 4 5 6 7 8 9 10 11 12 | require('igraph')
## build sample network
from <- c('A','A','B','B','C','C','D','D','E','E','E','F','F','H','L','L','O')
to <- c('B','C','D','E','F','G','H','I','J','J','K','L','G','M','N','O','P')
relations<-cbind(from,to)
g <- graph.data.frame(relations)
tiers <- c(1,2,3,4,1,3,4,2,1,2,3,4,0,0,1,2)
V(g)$tier <- tiers
plot(g) ## full network
plot(travOut(g, 'D')) ## sub network
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.