Learn R Programming

simcausal (version 0.5.7)

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 DAG +(obj1, obj2)

Value

An updated DAG object with new nodes

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.

See Also

node