Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

save_graph

Save a graph or graph series to disk


Description

Save a graph or a graph series object to disk.

Usage

save_graph(x, file)

Arguments

x

A graph object of class dgr_graph or a graph series object of type dgr_graph_1D.

file

A file name for the graph or graph series. Provide a character string and the .dgr extension will be applied to it.

See Also

Examples

# Create an undirected GNP
# graph with 100 nodes using
# a probability value of 0.05
gnp_graph <-
  create_graph(
    directed = FALSE) %>%
  add_gnp_graph(
    n = 100,
    p = 0.05)

# Save the graph to disk; use
# the file name `gnp_graph.dgr`
# save_graph(
#   x = gnp_graph,
#   file = "gnp_graph"
# )

# To read the graph file from
# disk, use `open_graph()`
# gnp_graph_2 <-
#   open_graph(
#     file = "gnp_graph.dgr"
# )

DiagrammeR

Graph/Network Visualization

v1.0.6.1
MIT + file LICENSE
Authors
Richard Iannone [aut, cre] (<https://orcid.org/0000-0003-3925-190X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.