1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/open_graph.R
3\name{open_graph}
4\alias{open_graph}
5\title{Read a graph or graph series from disk}
6\usage{
7open_graph(file)
8}
9\arguments{
10\item{file}{The filename for the graph or graph series. Optionally, this may
11contain a path to the file.}
12}
13\description{
14Load a graph or a graph series object from disk.
15}
16\examples{
17# Create an undirected GNP
18# graph with 100 nodes using
19# a probability value of 0.05
20gnp_graph <-
21  create_graph(
22    directed = FALSE) \%>\%
23  add_gnp_graph(
24    n = 100,
25    p = 0.05
26  )
27
28# Save the graph to disk; use
29# the file name `gnp_graph.dgr`
30# save_graph(
31#   x = gnp_graph,
32#   file = "gnp_graph"
33# )
34
35# To read the graph file from
36# disk, use `open_graph()`
37# gnp_graph_2 <-
38#   open_graph(
39#     file = "gnp_graph.dgr"
40#   )
41
42}
43