Reputation: 23
I cannot write any data to my MongoDB using R mongolite. I consistently get: Error: not primary
error.
collection <- mongolite::mongo(url=my_url, db=my_db, collection=my_collection)
collection$insert(iris)
Error: not primary
This Error: not primary
message occurs whatever I try to insert.
The database works fine, as I can write to it using Python without any problems.
I would appreciate any help!
collection$insert('{"a": 3}')
find
in the same database using mongolite (yes)Upvotes: 0
Views: 233