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

node_data

Insert node data attributes during node creation


Description

This helper function should be invoked to provide values for the namesake node_data argument, which is present in any function where nodes are created.

Usage

node_data(...)

Arguments

...

Node data attributes provided as one or more named vectors.

See Also

Examples

# Create a new graph and add
# a path with several node
# data attributes
graph <-
  create_graph() %>%
  add_path(
    n = 3,
    type = "path",
    node_data = node_data(
      hour = 5,
      index = c(1, 3, 2)))

# View the graph's internal
# node data frame; the node
# data attributes have been
# inserted
graph %>% get_node_df()

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.