Learn R Programming

DiagrammeR (version 0.8.4)

get_graph_name: Get graph name

Description

Get the name of a graph object of class dgr_graph.

Usage

get_graph_name(graph)

Arguments

graph
a graph object of class dgr_graph that is created using create_graph.

Value

a single-length character vector with the assigned graph name. If a graph name has not been set, NA is returned.

Examples

Run this code
# Create an empty graph
graph <- create_graph()

# Provide the new graph with a name
graph <- set_graph_name(graph, "the_name")

# Get the graph's name
get_graph_name(graph)
#> [1] "the_name"

Run the code above in your browser using DataLab