0
我使用RNeo4j软件包和igraph一起计算中介中心性并将其写回到Neo4j数据库。在RNeo4j包中不能使用方法'updateProp'
它可以完美计算,没有任何问题连接Neo4j。在我用它的节点的id命名并包含它的中间中心值的向量之后,我试图只更新一个节点,并且出现'updateProp'方法的问题。
我得到的错误是这个。
Error in UseMethod("updateProp") :
no applicable method for 'updateProp' applied to an object of class "list"
而这是我的代码卡住的一部分。
...
bet <- betweenness(g)
alice = getLabeledNodes(neo4j, "User", id = as.integer(names(bet[1])))
# returned valid node
# following line got the mentioned error.
alice = updateProp(alice,betweenness_centrality = as.numeric(bet[[1]]))
我也试过其他方式没有任何运气。 (也硬了的值是0,但它没有工作,要么)
newProp = list(betweenness_centrality = bet[[1]])
alice = updateProp(alice,newProp)
附:为我的参考网站http://rpackages.ianhowson.com/cran/RNeo4j/man/updateProp.html。
预先感谢您。
它的工作原理!非常感谢您的精彩套餐。 我误解了它是一个节点的'getLabeledNodes'的返回值。 我欠你很多!欢呼! –