Nodes

Share:

Description

Create a node in the graph with the given label and properties.

Usage

1
createNode(graph, .label = character(), ...)

Arguments

graph

A graph object.

.label

A character string.

...

A named list. Node properties in the form key = value.

Value

A node object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
graph = startGraph("http://localhost:7474/db/data/")
clear(graph)

bob = createNode(graph, "Person", name = "Bob", age = 24, kids = c("Jenny", "Larry"))
charles = createNode(graph, c("Person", "Student"), name = "Charles", age = 21)

bob
charles

props = list(name="David", age = 26)
david = createNode(graph, "Person", props)

david

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.