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

View source: R/read_file6.R

read_file6R 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)

mbojan/rgraph6 documentation built on Sept. 25, 2024, 2:14 a.m.