## 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)
# david = createNode(graph, "Person", name = "David", age = 20)
#
# createRel(alice, "KNOWS", bob)
# createRel(alice, "KNOWS", charles)
# createRel(charles, "KNOWS", david)
#
# cypher(graph, "MATCH n RETURN n.name, n.age")
#
# query = "MATCH n WHERE n.age < {age} RETURN n.name, n.age"
# cypher(graph, query, age = 24)
#
# query = "MATCH n WHERE n.name IN {names} RETURN n.name, n.age"
# names = c("Alice", "Charles")
# cypher(graph, query, names = names)
#
# query = "MATCH n WHERE n.age > {age1} AND n.age < {age2} RETURN n.name"
# cypher(graph, query, age1=22, age2=30)
#
# params = list(age1=22, age2=30)
# cypher(graph, query, params)
# ## End(Not run)
Run the code above in your browser using DataLab