View source: R/action_node_indexing.R
N | R Documentation |
DAG
NodesSubsetting/Indexing DAG
Nodes
N(DAG)
DAG |
A DAG object that was defined using functions |
returns a list of nodes that can be indexed as a typical named list "[[]]".
D <- DAG.empty()
D <- D + node(name="W1", distr="rbern", prob=plogis(-0.5))
D <- D + node(name="W2", distr="rbern", prob=plogis(-0.5 + 0.5*W1))
D <- set.DAG(D)
#Returns all nodes from DAG D
N(D)
#Returns node W1 from DAG D
N(D)["W1"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.