simcausal (version 0.2.0)

add.nodes: Adding Node(s) to DAG

Description

Adding nodes to a growing DAG object, as in DAG + node(). Use either syntax DAG + node() or add.nodes(DAG = , nodes = node()). Both give identical results, see the examples in the vignette and below for details.

Usage

add.nodes(DAG, nodes)

## S3 method for class 'DAG': +(obj1, obj2)

Arguments

DAG
DAG object
nodes
A node or several nodes returned from a call to node function. If the node(s) under same name(s) already exist, the old node(s) get overwritten.
obj1
Object that belongs to either classes: DAG, DAG.action or DAG.nodelist.
obj2
Object that belongs to either classes: DAG, DAG.action or DAG.nodelist.

Value

  • An updated DAG object with new nodes

See Also

node