以下代码无法正确存储属性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)
节点t1将具有dt == 2000.节点t2将具有正确的值。 RNeo4j是否需要double的特殊语法?
由于
答案 0 :(得分:0)
你发现了一个错误。 CRAN上提供固定版本(1.6.2)。您必须重新启动R然后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"
对不起!在较长的数字(例如2015.1113)之后传递一个较短的数字(例如1)时,导致错误的舍入是一个愚蠢的错误。