Add a new node to a visNetwork node dataframe

add_node(
  nodedf,
  id,
  label = "",
  size = 40,
  start = FALSE,
  end = FALSE,
  shape = "dot",
  color.background = "lightblue",
  color.border = "lightblue",
  shadow = FALSE
)

Arguments

nodedf

a data.table containing the nodes.

id

id of the new node.

label

label of the new node. default: ""

size

size of the new node. Default: 40

start

is this node a start node? Default: FALSE

end

is this node an end node? Default: FALSE

shape

the shape of this node. See visNetwork docs. Default: "dot"

color.background

the background color of the node. Default: "lightblue"

color.border

the border color of the node. Default: "lightblue"

shadow

Whether this node has a shadow. Default: false

Value

a data.table with one more row than nodedf