How can I find the number of documents in a collection using the RMongo package?
Asked
Active
Viewed 245 times
1 Answers
1
You could use the rmongodb
package which has more recent updates.
Connect to your base (here localhost) and use mongo.count
to count documents in a specific collection.
library(rmongodb)
mongo <- mongo.create()
mongo.count(mongo = mongo, ns = coll_name)
With the argument query
you also could count document resulting of a specific query if you want.

cderv
- 6,272
- 1
- 21
- 31