I have difficulty with writing query via rmongo ..
mongo <- mongoDbConnect(dbName="baba", host="inja.com",port='27017')
dbAuthenticate(mongo, 'alaki', 'dolaki')
dbShowCollections(mongo)
> Acol Bcol Ccol Dcol
now :
result = dbGetQuery(mongo, "settings", "{find_one()}",0,10)
> Error in .jcall(rmongo.object@javaMongo, "S", "dbGetQuery", collection, :
com.mongodb.util.JSONParseException:
{find_one()}
I appreciate if someone give me some hint and help me to make a table or R list from my database.
The query argument for
dbGetQuery()
should be the data you want to search for, not find_one().The result of a dbGetQuery() will be a Data Frame.
Example usage: