Learn R Programming

rgraph6 (version 2.0-4)

adjacency_from_text: Create adjacency matrices from 'graph6', 'sparse6', or 'digraph6' symbols

Description

Create adjacency matrices from 'graph6', 'sparse6', or 'digraph6' symbols

Usage

adjacency_from_text(object, ...)

Value

A list of adjacency matrices.

Arguments

object

character vector of 'graph6', 'sparse6', or 'digraph6' symbols

...

other arguments, currently ignored

Details

If object contains 'sparse6' symbols, which are in fact encoded edgelists, the function will return corresponding adjacency matrices creating temporary igraph objects internally.

Examples

Run this code
# Graph6 symbols
sampleg6
adjacency_from_text(sampleg6)

# Sparse6 symbols
s6 <- c(":DgXI@G~", ":DgWCgCb")
adjacency_from_text(s6)

# Digraph6 symbol
d6 <- "&N????C??D?_G??C?????_?C_??????C??Q@O?G?"
adjacency_from_text(d6)

Run the code above in your browser using DataLab