Skip to contents

Extract relational information from MultiFactor and return an igraph object. Calls igraph::graph_from_data_frame under the hood.

Usage

# S3 method for class '`MultiFactor::MultiFactor`'
as.igraph(x, directed = FALSE, ...)

Arguments

x

a MultiFactor

directed

See ?igraph::graph_from_data_frame

...

Additional arguments passed to igraph::graph_from_data_frame.

Value

an igraph object.

Examples

x <- randomMultiFactor()

# Make igraph object:
igraph::as.igraph(x)
#> IGRAPH b65ed7f UN-- 6 5 -- 
#> + attr: name (v/c), name (e/c)
#> + edges from b65ed7f (vertex names):
#> [1] a--b b--c c--d d--e e--f