Plot of a Bayesian network
Plot of a Bayesian network.
bnplot(dag, shape = "ellipse", main = NULL, sub = NULL)
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. |
The function is called from the "bnlearn" package which invokes the "Rgraphviz" package from Bioconductor and you need to install it first.
The Bayesian network is visualised.
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
## 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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.