Read files of 'graph6', 'sparse6' or 'digraph6' symbols
Read files of 'graph6', 'sparse6' or 'digraph6' symbols
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.
Returns
A list of decoded graphs in the form of objects determined by type.
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.
Examples
g6_file <- tempfile()write(sampleg6,g6_file)read_file6(g6_file, type ="adjacency")unlink(g6_file)