Description Usage Arguments Value See Also Examples
View source: R/getLabeledNodes.R
Retrieve nodes from the graph with the specified label and optional key = value pair.
1 | getLabeledNodes(graph, .label, ...)
|
graph |
A graph object. |
.label |
A character string. |
... |
A named list. A key = value pair to search the labeled nodes. |
A list of node objects.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.