Questions tagged [rmongo]

RMongo is a R package which lets you query MongoDB databases.

37 questions
1
vote
1 answer

pymongo to RMongo, mongodb sort query

In pymongo I'm doing a sort query like this: from pymongo import MongoClient client = MongoClient() dbase = client[dbname] collection = dbase[symbol] start = time.time() cursor = collection.find().sort([{'_id', -1}]).limit(6000) data =…
1
vote
2 answers

How to convert column of a data frame in json format in R

email foo bar 1 a@g.com 23 34 2 b@g.com 43 34 3 c@g.com 35 32 Now I want to create JSON docs for each email as of following form: doc 1: { "email" : "a@g.com"} doc 2: { "email" : "b@g.com"} doc 3: {…
rootkea
  • 1,474
  • 2
  • 12
  • 32
1
vote
1 answer

Connection error with mongodb using Rmongo

I am running meteor application in a localhost on port 3000 and I can't connect R with my MongoDB. ( I checked this code for MongoDB running on port 27017 without meteor - just pure database and it's working properly). Meteor create an own database…
beciaha
  • 71
  • 6
1
vote
0 answers

RMongo: How do you switch to another database?

I have a mongodb like this: # works mongo -u user -p pass --authenticationDatabase "admin" --port 27018 # switch to test use test # does not work mongo -u user -p pass --authenticationDatabase "test" --port 27018 I am using RMongo to connect to…
Komal Rathi
  • 4,164
  • 13
  • 60
  • 98
1
vote
1 answer

RMongo: Connect to mongoDB using port forwarding

I connect to a mongodb server using port forwarding like this: ssh -i key.pem -Nf -L 27018:xx.xxx.xxx.xxx:27017 ubuntu@xx.xxx.xxx.xxx mongo -u user -p pass --authenticationDatabase "db" --port 27018 Then I run R to connect and query the…
Komal Rathi
  • 4,164
  • 13
  • 60
  • 98
1
vote
1 answer

Get data statistics in R with rmongodb or RMongo

Using robomongo I can get basic description of the data using db.getCollection('Exempt').stats() but i cannot seem to get this info in nR using the rmongodb or RMongo packages. Can anyone please help? Regards, Abhishek
1
vote
0 answers

How to query Mongo DB using a variable value in RMongo?

I have to retrieve data from a Mongo DB collection given a particular condition based on a variable value in R. I could find documentation on querying with static values in RMongo. But I could not find how to query using variable values. I tried the…
avidlearner
  • 243
  • 3
  • 16
1
vote
1 answer

Compilation failed for package 'RMongo' on Windows

I am having trouble trying to install RMongo version 0.1.0. My code is as follows: library(devtools) install_github("tc/RMongo") The system output that I'm getting is: Downloading GitHub repo tc/RMongo@master Installing…
Horo
  • 53
  • 5
1
vote
0 answers

How to connect R with Mongo and be able to filter on numberlong values and nested keys

I am trying to connect R with Mongo using 2 packages: rmongodb and RMongo. I would like to create from R mongo query, which is based on index named id. Id is a 19-number integer e.g 1234567891234567891, which is kept in mongo in numberlong format.…
Kacper
  • 185
  • 9
1
vote
1 answer

Convert Mongo Datestamp to R readable date format.

I pulled data into R from MongoDB and my dates are in the format string "Thu May 08 01:00:00 EAT 2008". I want to change them to format "%a %b %d %H:%M:%S" readable by R and been banging my head so far. I came around using DF$createdAt <-…
ngamita
  • 329
  • 2
  • 12
1
vote
1 answer

Properly passing mongodb ISODate in R

I'm trying to read data from MongoDB to R through RMongo: dbGetQueryForKeys(mongo, "daily", "{type:'AAA', date:{$gt:ISODate('2008-01-01')}}", "{_id:0, date:1}") which gives me an error on ISODate. The query works perfectly from mongo command line.…
sashkello
  • 17,306
  • 24
  • 81
  • 109
1
vote
2 answers

RMongo dbGetQueryForKeys(), what is the structure of "keys," and how do I sub-key them?

I am trying to query a mongo database from R using RMongo and return the values of a couple nested documents. Looking through the documentation for RMongo, I understand the following query: output <- dbGetQueryForKeys(mongo, 'test_data', '{"foo":…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
0
votes
1 answer

Can I execute atomic transactions with MongoDB from R?

As the title states: Is there a way with any of the mongodb-clients in R to execute atomic transactions? If so, how would I do this? I couldn't find any documentation on this topic.
AnjaM
  • 2,941
  • 8
  • 39
  • 62
0
votes
0 answers

Is there any way to install RMongo package as its officially removed from CRAN?

I need to install RMongo to connect to my local MongoDB database. On installing RMongo I am getting this error: Warning in install.packages : package ‘RMongo’ is not available (for R version 3.5.3) I also downloaded RMongo tar file and stored in…
bit_zoom
  • 1
  • 1
0
votes
0 answers

How to store date from R to MongoDB with RMongo package?

I want to send data from R to MongoDB with RMongo package I was able to do it with mongolite package. And also want to do it with RMongo package