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

delete_cache

Delete vectors cached in a graph object


Description

Delete vectors cached in a graph object of class dgr_graph.

Usage

delete_cache(graph, name = NULL)

Arguments

graph

A graph object of class dgr_graph.

name

One or more name of vector objects to delete from the cache. If none supplied, all cached vectors available in the graph will be deleted.

Value

A vector.

Examples

# Create an empty graph
graph <-
  create_graph()

# Cache 3 different vectors inside
# the graph object
graph <-
  graph %>%
  set_cache(
    name = "a",
    to_cache = 1:4) %>%
  set_cache(
    name = "b",
    to_cache = 5:9) %>%
  set_cache(
    name = "c",
    to_cache = 10:14)

# Delete cache `b`
graph <-
  graph %>%
  delete_cache(name = "b")

# Delete remaining cached vectors
graph <-
  graph %>%
  delete_cache()

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.