from_digraph6 {rgraph6}R Documentation

Parsing digraph6 symbols

Description

These functions take a vector of 'digraph6' symbols and return a list of other types of objects:

Usage

adjacency_from_digraph6(d6)

igraph_from_digraph6(d6, ...)

network_from_digraph6(d6, ...)

Arguments

d6

character vector of 'digraph6' symbols

...

other arguments, see Details.

Details

For igraph_from_digraph6() additional arguments are passed to igraph::graph_from_adjacency_matrix()

For network_from_digraph6() additional arguments are passed to network::as.network()

Value

The returned object is:

See Also

as_digraph6() for encoding objects as 'digraph6' symbols.

Examples

am <- matrix(rbinom(16, 1, 0.3), 4, 4)
d6 <- as_digraph6(am)

# To adjacency matrix ------------------------------------------------------
adjacency_from_digraph6(d6)

# To igraph objects --------------------------------------------------------
if(requireNamespace("igraph", quietly=TRUE)) {
  igraph_from_digraph6(d6)
}

# To network objects -------------------------------------------------------
if(requireNamespace("network", quietly=TRUE)) {
  network_from_digraph6(d6)
}

[Package rgraph6 version 2.0-4 Index]