endNode: Retrieve Nodes from Relationships or Paths

Description Usage Arguments Value See Also Examples

View source: R/endNode.R

Description

Retrieve the end node from a relationship or path object.

Usage

1
endNode(object)

Arguments

object

A relationship or path object.

Value

A node object.

See Also

startNode

Examples

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

alice = createNode(graph, "Person", name = "Alice")
bob = createNode(graph, "Person", name = "Bob")

rel = createRel(alice, "WORKS_WITH", bob)

endNode(rel)

query = "
MATCH p = (a:Person)-[:WORKS_WITH]->(b:Person)
WHERE a.name = 'Alice' AND b.name = 'Bob'
RETURN p
"

path = cypherToList(graph, query)[[1]]$p

endNode(path)

## End(Not run)

RNeo4j documentation built on May 29, 2017, 4:01 p.m.

Related to endNode in RNeo4j...