read_file6 {rgraph6}R Documentation

Read files of 'graph6', 'sparse6' or 'digraph6' symbols

Description

Read files of 'graph6', 'sparse6' or 'digraph6' symbols

Usage

read_file6(path, type = "adjacency")

Arguments

path

character; path to file name

type

character; one of "adjacency", "edgelist", "igraph", or "network". Type of result returned.

Details

File pointed to by path is a text file with one graph symbol per line. Optional headers of the form ⁠>>graph6<<⁠ or ⁠>>sparse6<<⁠ in the first line (and without the newline after the header) are ignored and removed.

Value

A list of decoded graphs in the form of objects determined by type.

Examples

g6_file <- tempfile()
write(sampleg6,g6_file)
read_file6(g6_file, type = "adjacency")
unlink(g6_file)

[Package rgraph6 version 2.0-4 Index]