Learn R Programming

rgraph6 (version 2.0-4)

igraph_from_text: Create igraph objects from 'graph6', 'sparse6', or 'digraph6' symbols

Description

Create igraph objects from 'graph6', 'sparse6', or 'digraph6' symbols

Usage

igraph_from_text(object)

Value

A list of 'igraph' objects.

Arguments

object

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

Examples

Run this code
if(requireNamespace("igraph", quietly=TRUE)) {
   # Graph6 symbols
   sampleg6
   igraph_from_text(sampleg6)

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

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

Run the code above in your browser using DataLab