With a graph object of class dgr_graph, add a new node of a specified type to extant nodes within the graph.
Usage
add_node(graph, node, from = NULL, to = NULL, label = TRUE, type = NULL,
...)
Arguments
graph
a graph object of class dgr_graph that is created using create_graph.
node
a node ID for the newly connected node.
from
an optional vector containing node IDs from which edges will be directed to the new node.
to
an optional vector containing node IDs to which edges will be directed from the new node.
label
a character object for supplying an optional label to the node. Setting to TRUE ascribes the node ID to the label. Setting to FALSE yields a blank label.
type
an optional string that describes the entity type for the node to be added.
...
one or more vectors pertaining to node attributes.