RNeo4j (version 1.6.4)

createNode: Nodes

Description

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

Usage

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

Run this code
## 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)

Run the code above in your browser using DataLab