ropensci / sofa

Easy R interface to CouchDB
https://docs.ropensci.org/sofa/
33 stars 17 forks source link
cloudant couchdb couchdb-client database r r-package rstats

sofa

CRAN
status Project Status: Active – The project has reached a stable, usable
state and is being actively
developed. R-check codecov.io rstudio mirror
downloads

An easy interface to CouchDB from R

sofa docs: https://docs.ropensci.org/sofa/

CouchDB versions

sofa works with CouchDB v2 and v3. See the builds for checks on various CouchDB versions.

CouchDB Info

Connect to CouchDB

This may be starting it on your terminal/shell

couchdb

Or opening the CouchDB app on your machine, or running it in Docker. Whatever it is, start it up.

Install sofa

From CRAN

install.packages("sofa")

Development version from GitHub

remotes::install_github("ropensci/sofa")

library('sofa')

Cushions

Cushions? What? Since it’s couch we gotta use cushions somehow. cushions are a connection class containing all connection info to a CouchDB instance. See ?Cushion for help.

As an example, connecting to a Cloudant couch:

z <- Cushion$new(
  host = "stuff.cloudant.com",
  transport = 'https',
  port = NULL,
  user = 'foobar',
  pwd = 'things'
)

Break down of parameters:

If you call Cushion$new() with no arguments you get a cushion set up for local use on your machine, with all defaults used.

x <- Cushion$new()

Ping the server

x$ping()

Nice, it’s working.

More

See the docs https://docs.ropensci.org/sofa/ for more.

Meta

ropensci\_footer