Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rm.node

Remove a node from a DAG.


Description

Function to conveniently remove a node from an existing DAG.

Usage

rm.node(dag, node)

Arguments

dag

The DAG from which to remove the node.

node

A single integer, indicating which node is to be removed.

Value

A DAG with the node specified removed, along with the corresponding attributes and dependent variables, i.e. arcs involving this node are also removed, and the numbering of the nodes (and their occurrence in arcs) is corrected accordingly.
Note: Search components (searchType, searchRes) of the DAG currently are generally set to NULL, even if no path is removed. This is for simplicity, because the node numbers would need to be changed eg. in the searchRes variables etc.

Author(s)

Lutz P Breitling <l.breitling@posteo.de>

See Also

Examples

dag1a<-dag.adjust(demo.dag1());
dag1armn<-rm.node(dag1a, 3);

dagR

R Functions for Directed Acyclic Graphs

v1.2.0
GPL-2
Authors
Lutz P Breitling
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.