View source: R/plotusingrgraphviz.R
plotdiffs | R Documentation |
This function plots edges from two graphs in one and indicates similarities and differences between these graphs. It is also possible to use this function for plotting mistakes in estimated graph when the ground truth graph is known.
plotdiffs(
graph1,
graph2,
estimated = TRUE,
name1 = "graph1",
name2 = "graph2",
clusters = NULL,
...
)
graph1 |
object of class graphNEL or its adjacency matrix |
graph2 |
object of class graphNEL or its adjacency matrix |
estimated |
logical, indicates if graph1 is estimated graph and graph2 is ground truth DAG, TRUE by default; this affects the legend and colouring of the edges |
name1 |
character, custom name for 'graph1' |
name2 |
character, custom name for 'graph2' |
clusters |
(optional) a list of nodes to be represented on the graph as clusters |
... |
optional parameters passed to |
plots the graph which includes edges from graph1 and graph2; edges which are different in graph1 compared to graph2 are coloured according to the type of a difference
Polina Suter
Asiascore<-scoreparameters("bde",Asia)
Asiamap<-orderMCMC(Asiascore)
plotdiffs(Asiamap$DAG,Asiamat)
Asiacp<-pcalg::dag2cpdag(m2graph(Asiamat))
mapcp<-pcalg::dag2cpdag(m2graph(Asiamap$DAG))
plotdiffs(mapcp,Asiacp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.