graphs: Utilities to manipulate graphs

bayesvl graph utilitiesR Documentation

Utilities to manipulate graphs

Description

Manipulate directed acyclic graph of an object of class bayesvl.

Usage

# added a new node to the graph.
bvl_addNode(dag, name, dist = "norm", priors = NULL, fun = NULL, out_type = NULL, 
  lower = NULL, upper=NULL, test = NULL)

# added a new path between nodes to the graph.
bvl_addArc(dag, from, to, type = "slope", priors = NULL, fun = NULL)

# added a new path between nodes to the graph.
bvl_addArc(dag, from, to, type = "slope", priors = NULL, fun = NULL)

Arguments

dag

an object of class bayesvl

name

a character string, the name of a node.

dist

a character string, distribution code of the node (norm, binom).

priors

a vector of string, the priors of the node or path.

fun

a character string, the transform function of the node.

out_type

a character string, the variable data type (int, real, ...).

lower

integer or real, the lower bound of variable data type (int or real).

upper

integer or real, the upper bound of variable data type (int or real).

test

a vector of testing values for variable.

from

a character string, the name of node the path connect from.

to

a character string, the name of node the path connect to.

type

a character string, the path type between nodes (slope, varint, ...).

Value

bvl_addNode(), bvl_addArc() return object class bayesvl.

Author(s)

La Viet-Phuong, Vuong Quan-Hoang

References

For documentation, case studies, worked examples, and other tutorial materials, visit the References section on our GitHub:

For case studies using the package in research articles, see:

Examples


dag = bayesvl()

# add nodes to dag
dag = bvl_addNode(dag, "node1")
dag = bvl_addNode(dag, "node2")

# add the path between two nodes
dag = bvl_addArc(dag, "node1", "node2")

summary(dag)


bayesvl documentation built on June 8, 2025, 10:38 a.m.

Related to graphs in bayesvl...