Learn R Programming

sparsebnUtils (version 0.0.8)

resetGraphPackage: Change data structure for representing graphs internally

Description

Changes the output of the main algorithms to be compatible with other packages in the R ecosystem.

Usage

resetGraphPackage(coerce = TRUE)

setGraphPackage(pkg, matchPlot = TRUE, coerce = FALSE)

getGraphPackage()

Arguments

coerce

If TRUE, then all sparsebnFit and sparsebnPath objects in the global environment will be coerced to be compatible with the selected package. This will overwrite your existing data.

pkg

The desired package; default value is NULL corresponding to edgeList. Possible values are "sparsebn", "igraph", "graph", "bnlearn", and "network".

matchPlot

Force the underlying plotting mechanism to match the selected package (see setPlotPackage).

Functions

  • resetGraphPackage: Reset all data to default edgeList format and set graph package back to default "sparsebn".

  • getGraphPackage: Returns the current choice of graph package ( NULL corresponds to no selection)

Details

sparsebn is compatible with four different data structures for representing graphs: edgeList (default), graphNEL-class (from the graph package), igraph (from the igraph package), and network (from network-package). edgeList is provided by default in sparsebn, however, the other three options require that extra packages are installed.

See Also

setPlotPackage, getPlotPackage