ancestry | R Documentation |
Get ancestry for a collection of nodes in a graph.
These functions are wrappers for the original SEMID
R package.
ancestors(g, nodes)
descendants(g, nodes)
parents(g, nodes)
siblings(g, nodes)
g |
An igraph object. |
nodes |
the nodes in the graph of which to get the ancestry. |
a sorted vector of nodes.
Rina Foygel Barber, Mathias Drton and Luca Weihs (2019). SEMID: Identifiability of Linear Structural Equation Models. R package version 0.3.2. <https://CRAN.R-project.org/package=SEMID/>
# Get all ancestors
an <- V(sachs$graph)[ancestors(sachs$graph, "Erk")]; an
# Get parents
pa <- V(sachs$graph)[parents(sachs$graph, "PKC")]; pa
# Get descendants
de <- V(sachs$graph)[descendants(sachs$graph, "PKA")]; de
# Get siblings
sib <- V(sachs$graph)[siblings(sachs$graph, "PIP3")]; sib
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.