This is an optional method to set the write concern for a given Mongo DB connection. By default the Mongo DB library does not check if a write (insert, update, remove) actually succeed.
RMongo object containing the database connection information.
w
Number of write to aknowledge. -1 Don't even report network errors. 0 Don't wait for acknowledgement from the server. 1 Wait for acknowledgement but don't wait for secondaries to replicate. 2+ Wait for one or more secondaries to also acknowledge.
wtimeout
How long to wait for slaves before failing. 0 indefinite. Greater than 0 milliseconds to wait.