View source: R/graph-functions.R
| f.children | R Documentation |
Function to extract the children of a node OR nodes in a graph object. Children of a node are the nodes that have edges from the given node.
f.children(graph, nodes)
graph |
A graph object generated by the |
nodes |
A character vector of nodes for which to extract children. |
A vector of vertices contains children set of the given nodes.
graph <- make.graph(vertices=c('A','M','L','Y','X'),
bi_edges=list(c('A','Y')),
di_edges=list(c('X','A'), c('X','M'), c('X','L'),
c('X','Y'), c('M','Y'), c('A','M'), c('A','L'), c('M','L'), c('L','Y')))
f.children(graph, c('A'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.