1

The following code fails to correctly store the attribute dt:

graph = startGraph("http://localhost:7474/db/data/", username="neo4j", password=MYPASS)  
clear(graph, input=FALSE)  
t1 = createNode(graph, "testType", name="t1", dt=2015.1113, v1=1)
t2 = createNode(graph, "testType", name="t2", dt=2015.1113)

The node t1 will have dt == 2000. The node t2 will have the correct value. Does RNeo4j require special syntax for double?

Thanks

1 Answers1

0

You found a bug. The fixed version (1.6.2) is available on CRAN. You'll have to restart R and then install.packages("RNeo4j").

> library(RNeo4j)
> packageVersion("RNeo4j")
[1] ‘1.6.2’
> graph = startGraph("http://localhost:7474/db/data/")  
> clear(graph, input=FALSE)  
> t1 = createNode(graph, "testType", name="t1", dt=2015.1113, v1=1)
> t2 = createNode(graph, "testType", name="t2", dt=2015.1113)
> t1
< Node > 
testType

$v1
[1] 1

$dt
[1] 2015.1113

$name
[1] "t1"

> t2
< Node > 
testType

$dt
[1] 2015.1113

$name
[1] "t2"

Sorry about that! It was a silly mistake that caused incorrect rounding when passing a shorter-digit number (e.g. 1) following a longer-digit number (e.g. 2015.1113).

Nicole White
  • 7,720
  • 29
  • 31