getGraph: Get a graph object out of an MultiFactor.

getGraph,MultiFactor-methodR Documentation

Get a graph object out of an MultiFactor.

Description

Get a graph object out of an MultiFactor.

Usage

## S4 method for signature 'MultiFactor'
getGraph(x, format = "igraph", ...)

## S4 method for signature 'list'
getGraph(x, format = "igraph", ...)

Arguments

x

MultiFactor

format

⁠Character scalar⁠, controls output format by package name. "igraph" and "graph" are supported.

...

additional arguments (currently not used).

Value

a specified graph object.

See Also

igraph::graph_from_data_frame() and igraph::as_graphnel(), which are used under the hood, from igraph::igraph() package.

Examples

# Generate a regular igraph object
g <- getGraph(kegg_link())
plot(g)


# Output formats
ec2cpd <- kegg_link()[["ec2cpd"]]

getGraph(ec2cpd, format = "graph")
getGraph(ec2cpd, format = "igraph")


thomazbastiaanssen/anansi documentation built on June 9, 2025, 3:59 p.m.