I posted earlier this week about sofa (here), introducing a package I started recently that interacts with CouchDB from R. There’s been a fair amount of response at least in terms of page views, so I’ll take that as a sign to keep going.
One thing that would be nice while you are CouchDB-ing is to interact with local and remote databases. I have incorporated the ability to interact with remote CouchDB databases in many of the functions, not all though. The remote data stores supported right now are Cloudant and Iriscouch.
Hadley Wickham suggested that a package called sofa should have something called cushion. And so it must be. It’s just a small function, called cushion, which puts a cushion on the sofa, or in reality, sets up your authentication for remote data stores. cushion just writes your username and password to your options list and then the functions look for your authentication details via getOption. Of course these auth details aren’t stored permanently - when you restart R you have to write them again to options. You can store them permanently in your .Rprofile file if you like, usally at ~/.Rprofile by putting in entry like options(cloudant.pwd = “mycoolpassword”).
Put a cushion on the sofa - that is, save your auth details
Ping each server
Now we’ll do similar tasks on a local and two remote databases (cloudant and iriscouch)