Finds all the ancestors of a collection of nodes. These ancestors DO include the nodes themselves (every node is considered an ancestor of itself).
ancestors(this, nodes, ...)# S3 method for LatentDigraphFixedOrder
ancestors(this, nodes, includeObserved = T, includeLatents = T, ...)
# S3 method for LatentDigraph
ancestors(this, nodes, includeObserved = T, includeLatents = T, ...)
# S3 method for MixedGraph
ancestors(this, nodes, ...)
the ancestors of the nodes in the observed part of the graph.
the graph object
the nodes from which to find all ancestors
ignored.
if TRUE includes observed nodes in the returned set.
if TRUE includes latent nodes in the returned set.