convert | R Documentation |
Convert graph to format associated with specific package
convert(graph, format = "mixedgraph", cur_format, ...)
graph |
graphical object, of one of classes listed below |
format |
character string giving new format to convert to |
cur_format |
character string of current format; can be deduced from the object in many cases |
... |
other arguments |
Possible formats are
mixedgraph
ggm
, an adjacency matrix as specified in the ggm
package;
graphNEL
, graphAM
, graphBAM
from the graph
package;
igraph
;
PAG
: that is, the output of pc()
or fci()
functions in the pcalg
package;
bn
from the bnlearn
package;
ADMG
, from the ADMGs
package.
The function can recognise the class of objects other than "ggm", which is just an adjacency matrix.
Implemented natively thus far:
mixedgraph <-> ggm
mixedgraph <-> ADMG
mixedgraph <-> graphNEL
mixedgraph <-> graphAM
mixedgraph <-> graphBAM
mixedgraph <-> PAG
mixedgraph <-> bn
mixedgraph <-> igraph (goes mixedgraph -> graphNEL -> igraph)
graphNEL <-> igraph (using functions in the igraph
package)
graphNEL, graphAM <-> bn (using functions in the bnlearn
package)
ggm
entries must be specified by cur_format = "ggm"
.
PAG
objects are those whose class inherits from gAlgo
,
or an adjacency matrix if cur_format = "PAG"
is specified.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.