Description Usage Arguments Value See Also Examples
Determine if a mongo connection object is connected to a master. Normally, this is only used with replsets to see if we are currently connected to the master of the replset. However, when connected to a singleton, this function reports TRUE also.
1 |
mongo |
(mongo) a mongo connection object. |
(logical) TRUE if the server reports that it is a master; otherwise, FALSE.
mongo.create
,
mongo.
1 2 3 4 5 6 7 8 | ## Not run:
mongo <- mongo.create(c("127.0.0.1", "192.168.0.3"), name="Accounts")
if (mongo.is.connected(mongo)) {
print("isMaster")
print(if (mongo.is.master(mongo)) "Yes" else "No")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.