Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bnplot

Plot of a Bayesian network


Description

Plot of a Bayesian network.

Usage

bnplot(dag, shape = "ellipse", main = NULL, sub = NULL)

Arguments

dag

A BN object, an object of class "bn".

shape

A character string defining the shape of the nodes, "ellipse" (default value), "circle" or "rectangle".

main

The main title of the graph displayed on the top.

sub

The subtitle of the graph displayed at the bottom.

Details

The function is called from the "bnlearn" package which invokes the "Rgraphviz" package from Bioconductor and you need to install it first.

Value

The Bayesian network is visualised.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

See Also

Examples

## Not run: 
# simulate a dataset with continuous data
x <- matrix( rnorm(200 * 10, 1, 10), nrow = 200 )
a <- pchc(x)
bnplot(a$dag)

## End(Not run)

pchc

Bayesian Network Learning with the PCHC and Related Algorithms

v0.5
GPL (>= 2)
Authors
Michail Tsagris [aut, cre]
Initial release
2021-03-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.