Hi,
I am using RMongo to connect to MongoDB.
# this is how I connect using the mongo driver:
mongo -u user -p pass --authenticationDatabase "admin" --port 27018
# after I get in the database, I switch to test and query it
use test
# Now in R, this works perfectly
mg1 <- mongoDbConnect(dbName = 'admin', host = 'localhost', port = '27018')
auth <- dbAuthenticate(rmongo.object = mg1, username = 'user', password = 'pass')
However, I want to switch to another database called test and query it. How can I do that?
Thanks,
Komal