View source: R/graph-functions.R
| f.reachable_closure | R Documentation |
Function to return the reachable closure of a set of vertices in a graph object.
First obtain a Conditional ADMG (CADMG) via recursively fixing as many vertices as possible in the set of all vertices (V) excluding the set of vertices specified by the nodes parameter (S), i.e. V \ S.
The reachable closure is the subset of V \ S, where each vertex is not fixable even upon fixing other vertices.
f.reachable_closure(graph, nodes)
graph |
A graph object generated by the |
nodes |
A character vector of vertices. |
A list containing the following components:
A character vector containing the reachable closure of the given vertices.
A character vector of vertices telling the order in which the vertices were fixed.
The CADMG obtained via recursively fixing as many vertices as possible in the set of all vertices (V) excluding the set of vertices specified by the nodes parameter (S), i.e. V \ S.
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.reachable_closure(graph, 'A')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.