getLabeledNodes: Retrieve Nodes by Label and Property

Description Usage Arguments Value See Also Examples

Description

Retrieve nodes from the graph with the specified label and optional key = value pair.

Usage

1
getLabeledNodes(graph, .label, ...)

Arguments

graph

A graph object.

.label

A character string.

...

A named list. A key = value pair to search the labeled nodes.

Value

A list of node objects.

See Also

getUniqueNode

Examples

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

createNode(graph, "School", name = "University of Texas at Austin")
createNode(graph, "School", name = "Louisiana State University")

createNode(graph, "Person", name = "Nicole", status = "Employed")
createNode(graph, "Person", name = "Drew", status = "Employed")
createNode(graph, "Person", name = "Aaron", status = "Unemployed")

schools = getLabeledNodes(graph, "School")

sapply(schools, function(s) s$name)

employed_people = getLabeledNodes(graph, "Person", status = "Employed")

sapply(employed_people, function(p) p$name)

## End(Not run)

nicolewhite/RNeo4j documentation built on May 23, 2019, 5:09 p.m.