add.node | R Documentation |
Conveniently adds a node to an existing DAG, inserting its coordinates and label before the outcome node. Also updates the arcs correspondingly.
add.node(dag, name = "unknown", type = 1, x = NA, y = NA)
dag |
The DAG to which the node is to be added. |
name |
Label for the node (defaults to "unknown"). |
type |
Type of node (1=covariable, 2=unknown); defaults to 1. |
x |
X coordinate for the node position. |
y |
Y coordinate for the node position. |
If no x and y coordinates are provided, the function places the node
in an arbitrary position, slightly different with each additional
node, so that one can more easily replace the nodes afterwards
using dag.move
.
A DAG with the new node added.
Lutz P Breitling <l.breitling@posteo.de>
rm.node
, add.arc
, rm.arc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.