Skip to contents

This function loads graphs from the file system into the R environment. There are two loading options: Loading all files from a directory. Loading individual graphs.

Usage

load_graphs(use_directory = NULL, use_list = NULL, format)

Arguments

use_directory

The absolute path to a directory that contains graph files to load.

use_list

A list of absolute paths to individual graph files to load.

format

Formats supported by igraph::read_graph.

Value

A list of graphs in igraph format.

Examples

if (FALSE) { # \dontrun{
graph_dir_list <- list()
path1 <- normalizePath("graph1.gml")
path2 <- normalizePath("graph2.gml")
graph_dir <- append(graph_dir_list, path1 )
graph_dir <- append(graph_dir_list, path2 )

grlist <- read_graph_list(graph_dir_list, "gml")
grlist
} # }