add_arc.bnet: add arc to a bnet object

Description Usage Arguments Value Examples

Description

add arc to a bnet object

Usage

1
add_arc.bnet(object, from, to, data = NULL, check = T, ...)

Arguments

object

a bnet obejct

from

node to start the arc from

to

node to end the arc

data

optionally a data.frame for fitting the to node that now has an additional parent

check

logical, to check or not for acyclic property

...

additional parameters to be passed to bmop fitting functions

Value

a bnet object

Examples

1
2
3
4
5
6
7
8
mat <- rbind(c(0, 0, 1, 1),
c(0, 0, 1, 1),
c(0, 0, 0, 1),
c(0, 0, 0, 0))
bnet<-as.bnet(mat)
plot(bnet)
bnet<-add_arc.bnet(bnet,"1","2")
plot(bnet)

gherardovarando/Rbnet documentation built on May 17, 2019, 4:18 a.m.