add_n_nodes {DiagrammeR} | R Documentation

## Add a multiple of new nodes to the graph

### Description

Add n new nodes to a graph object of class `dgr_graph`. Optionally, set node `type` values for the new nodes.

### Usage

    add_n_nodes(graph, n, set_node_type = NULL)

### Arguments

`graph` | a graph object of class `dgr_graph` that is created using `create_graph`.
`n` | the number of new nodes to add to the graph.
`set_node_type` | an optional string to apply a `type` attribute to all newly created nodes.

### Value

a graph object of class `dgr_graph`.

[Package DiagrammeR version 0.8.2 Index]