Learn R Programming

PCBN (version 0.1.1)

plot.PCBN: Print and plot PCBN objects

Description

Print and plot PCBN objects

Usage

# S3 method for PCBN
plot(x, ...)

# S3 method for PCBN print(x, print.orders = "non-empty", ...)

Value

No return value, both functions are called for side effects only.

Arguments

x

PCBN object

...

other arguments, unused

print.orders

if "all", print all orders. If "non-empty", this only prints the non-empty ones.

Examples

Run this code
DAG = create_empty_DAG(3)
DAG = bnlearn::set.arc(DAG, 'U1', 'U3')
DAG = bnlearn::set.arc(DAG, 'U2', 'U3')

order_hash = r2r::hashmap()
order_hash[['U3']] = c("U1", "U2")

fam = matrix(c(0, 0, 1,
               0, 0, 1,
               0, 0, 0), byrow = TRUE, ncol = 3)
tau = 0.2 * fam

my_PCBN = new_PCBN(
  DAG, order_hash,
  copula_mat = list(tau = tau, fam = fam))
print(my_PCBN)
plot(my_PCBN)

Run the code above in your browser using DataLab