Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Fixes for CRAN #73

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
^.*\.pdf$
README.Rmd
README.md
figure/
CONTRIBUTING.md
Makefile
.travis.yml
neokit/
^[^/]*\.sh$
^neo4j.*
^figure$
^neokit$
target
17 changes: 8 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
Package: RNeo4j
Title: Neo4j Driver for R
Title: 'Neo4j' Driver for R
LazyData: true
Version: 1.7.0
Date: 2016-08-27
Author: Nicole White
License: MIT + file LICENSE
Imports:
httr (>= 1.1.0),
jsonlite,
rstudioapi
Maintainer: Nicole White <nmwhite0131@gmail.com>
Description: Neo4j, a graph database, allows users to store their data as a
Description: 'Neo4j', a graph database, allows users to store their data as a
property graph. A graph consists of nodes that are connected by relationships;
both nodes and relationships can have properties, or key-value pairs. RNeo4j
is Neo4j's R driver. It allows users to read and write data from and to Neo4j
both nodes and relationships can have properties, or key-value pairs. 'RNeo4j'
is the 'Neo4j' R driver. It allows users to read and write data from and to 'Neo4j'
directly from their R environment by exposing an interface for interacting with
nodes, relationships, paths, and more. Most notably, it allows users to retrieve
Cypher query results as R data frames, where Cypher is Neo4j's graph query
language. Visit <http://www.neo4j.com> to learn more about Neo4j.
'Cypher' query results as R data frames, where 'Cypher' is the 'Neo4j' graph query
language. Visit <http://www.neo4j.com> to learn more about 'Neo4j'.
URL: http://github.com/nicolewhite/RNeo4j
BugReports: https://github.com/nicolewhite/RNeo4j/issues
Suggests:
testthat
RoxygenNote: 5.0.1
SystemRequirements: cargo, rustc, clang, libneo4j-client-dev
RoxygenNote: 6.1.1
SystemRequirements: GNU make, cargo, rustc, clang, libneo4j-client-dev
13 changes: 6 additions & 7 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ S3method(dijkstra,node)
S3method(dropConstraint,graph)
S3method(dropIndex,graph)
S3method(dropLabel,node)
S3method(endNode,path)
S3method(endNode,neopath)
S3method(endNode,relationship)
S3method(getConstraint,graph)
S3method(getID,boltEntity)
Expand Down Expand Up @@ -52,21 +52,21 @@ S3method(getUniqueNode,graph)
S3method(importSample,graph)
S3method(incomingRels,node)
S3method(newTransaction,graph)
S3method(nodes,path)
S3method(nodes,neopath)
S3method(outgoingRels,node)
S3method(print,boltGraph)
S3method(print,boltNode)
S3method(print,boltPath)
S3method(print,boltRelationship)
S3method(print,graph)
S3method(print,neopath)
S3method(print,node)
S3method(print,path)
S3method(print,relationship)
S3method(rels,path)
S3method(rels,neopath)
S3method(shortestPath,node)
S3method(startGraph,default)
S3method(startNode,boltRelationship)
S3method(startNode,path)
S3method(startNode,neopath)
S3method(startNode,relationship)
S3method(summary,boltGraph)
S3method(summary,graph)
Expand Down Expand Up @@ -116,6 +116,5 @@ export(startGraph)
export(startNode)
export(updateProp)
importFrom(utils,URLencode)
importFrom(utils,assignInNamespace)
importFrom(utils,browseURL)
useDynLib(RNeo4j)
useDynLib(RNeo4j, .registration = TRUE)
2 changes: 1 addition & 1 deletion R/RNeo4j.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
#' \href{https://github.com/nicolewhite/RNeo4j/issues}{create a new GitHub issue}.
#' For support, please \href{http://stackoverflow.com/questions/tagged/r-neo4j}{create a question on StackOverflow}.
#'
#' @useDynLib RNeo4j
#' @useDynLib RNeo4j, .registration = TRUE
NULL
2 changes: 1 addition & 1 deletion R/endNode.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ startNode.boltRelationship = function(object) {
}

#' @export
endNode.path = function(object) {
endNode.neopath = function(object) {
url = attr(object, "end")
result = http_request(url, "GET")
node = configure_result(result)
Expand Down
2 changes: 1 addition & 1 deletion R/getPaths.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ getPaths.graph = function(graph, query, ...) {

for(i in 1:length(result)) {
result[[i]] = result[[i]][[1]]
if(!("path" %in% class(result[[i]]))) {
if(!("neopath" %in% class(result[[i]]))) {
stop("At least one entity returned is not a path. Check that your query is returning paths.")
}
}
Expand Down
4 changes: 2 additions & 2 deletions R/getSinglePath.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ getSinglePath.graph = function(graph, query, ...) {

result = result[[1]][[1]]

if(!("path" %in% class(result))) {
if(!("neopath" %in% class(result))) {
stop("The entity returned is not a path. Check that your query is returning a path.")
}

return(result)
}

#' @export
getSinglePath.boltGraph = getSinglePath.graph;
getSinglePath.boltGraph = getSinglePath.graph
11 changes: 1 addition & 10 deletions R/internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ version = function() {
return("1.7.0")
}

#' @importFrom utils assignInNamespace
.onLoad = function(libname, pkgname) {
length.path = function(obj) {
return(length(unclass(obj)))
}

assignInNamespace('length.path', length.path, 'httr')
}

configure_result = function(result) {
if(is.character(result) | is.numeric(result)) {
return(result)
Expand Down Expand Up @@ -89,7 +80,7 @@ configure_result = function(result) {
attr(result, "end") = end
attr(result, "nodes") = nodes
attr(result, "relationships") = rels
class(result) = "path"
class(result) = "neopath"
}

return(result)
Expand Down
2 changes: 1 addition & 1 deletion R/nodes.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
nodes = function(path) UseMethod("nodes")

#' @export
nodes.path = function(path) {
nodes.neopath = function(path) {
urls = attr(path, "nodes")

FUN <- function(x) {
Expand Down
4 changes: 2 additions & 2 deletions R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ print.relationship = function(x, ...) {
print.boltRelationship = print.relationship;

#' @export
print.path = function(x, ...) {
print.neopath = function(x, ...) {
cat("< Path > \n")
if(suppressWarnings(any(!is.na(names(x))))) {
invisible(lapply(names(x), function(y) {print(x[y])}))
}
}

#' @export
print.boltPath = print.path;
print.boltPath = print.neopath;
2 changes: 1 addition & 1 deletion R/rels.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
rels = function(path) UseMethod("rels")

#' @export
rels.path = function(path) {
rels.neopath = function(path) {
urls = attr(path, "relationships")

FUN <- function(x) {
Expand Down
2 changes: 1 addition & 1 deletion R/startNode.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ startNode.boltRelationship = function(object) {
}

#' @export
startNode.path = function(object) {
startNode.neopath = function(object) {
url = attr(object, "start")
result = http_request(url, "GET")
node = configure_result(result)
Expand Down
1 change: 0 additions & 1 deletion man/RNeo4j.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/addConstraint.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/addIndex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/addLabel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/allDijkstra.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/allShortestPaths.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/browse.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/clear.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/createNode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/createRel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/cypher.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/cypherToList.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/delete.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/deleteProp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/dijkstra.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/dropConstraint.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/dropIndex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/dropLabel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/endNode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getConstraint.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getID.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getIndex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getLabel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getLabeledNodes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getNodes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getOrCreateNode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getPaths.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getRels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getSingleNode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getSinglePath.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getSingleRel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getType.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/getUniqueNode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/importSample.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/incomingRels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/nodes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/outgoingRels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading