Set global attributes
of a specific type (either
graph_attrs, node_attrs,
or edge_attrs for a graph
object of class dgr_graph).
set_global_graph_attrs(graph, attr, value, attr_type)
| graph | a graph object of class
|
|---|---|
| attr | the name of the
attribute to set for the |
| value | the value to be set
for the chosen attribute specified
in the |
| attr_type | the specific type
of global graph attribute to set.
The type is specified with |
a graph object of
class dgr_graph.
# Create a new graph and set # some global attributes graph <- create_graph() %>% set_global_graph_attrs( attr = "overlap", value = "true", attr_type = "graph") # Verify that the global attributes # have been set graph %>% get_global_graph_attrs()#> attr value attr_type #> 1 overlap true graph