Closed gousiosg closed 9 years ago
Please provide sessionInfo()
. I expect you use 1.6.5 version of rmongodb in both cases. I have no issues with latest github version on similar examples.
Here is the result of running sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)
locale:
[1] el_GR.UTF-8/el_GR.UTF-8/el_GR.UTF-8/C/el_GR.UTF-8/el_GR.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rmongodb_1.7.3
loaded via a namespace (and not attached):
[1] jsonlite_0.9.12 plyr_1.8.1 Rcpp_0.11.2 tools_3.1.0
>
In the current session, I am using the latest master version. The behavior is exactly the same in version 1.6.5.
Does this code work?
library(rmongodb)
mongo <- mongo.create()
for (lt in letters[1:5])
mongo.insert(mongo, 'test.test', b = list(projectId = "d84b99a1123ccc6052807f81c019f17cb61151bf", it = lt))
mongo.insert(mongo, 'test.test', b = list(projectId = "falseid", it = lt))
mongo.count(mongo, 'test.test', query = mongo.bson.from.JSON('{"projectId" : "d84b99a1123ccc6052807f81c019f17cb61151bf", "it":{"$in":["a", "b"]}}'))
mongo.drop(mongo, ns = 'test.test')
mongo.destroy(mongo)
@gousiosg , did you resolve this issue?
Assume issue resolved, I didn't recieve any feedback or comment. Close this. If the issue is still not resolved, please provide fully reproducible example.
I am trying to run a query that looks like this in JSON format:
In the MongoDB command line, this returns some rows:
However, when I try exactly the same query in R with
rmongodb
, I get -1 as a result:This behavior is the same in the version of
rmongodb
that is currently on CRAN (1.6.5) and also the latest master ea900ccbde.