getPaths: Retrieve Paths with Cypher Queries

Description Usage Arguments Value See Also Examples

View source: R/getPaths.R

Description

Deprecated. Use cypherToList. Retrieve paths from the graph with a Cypher query.

Usage

1
getPaths(graph, query, ...)

Arguments

graph

A graph object.

query

A character string.

...

Parameters to pass to the query in the form key = value, if applicable.

Value

A list of path objects.

See Also

getSinglePath

Examples

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

alice = createNode(graph, "Person", name = "Alice", age = 23)
bob = createNode(graph, "Person", name = "Bob", age = 22)
charles = createNode(graph, "Person", name = "Charles", age = 25)

createRel(alice, "KNOWS", bob)
createRel(alice, "KNOWS", charles)

query = "MATCH p = (:Person {name:'Alice'})-[:KNOWS]->(:Person) RETURN p"

paths = getPaths(graph, query)

lapply(paths, startNode)
lapply(paths, endNode)

## End(Not run)

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

Related to getPaths in RNeo4j...