Skip to content

wactbprot/R4CouchDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

         __ _  _     ___                 _        ___  ___ 
        /__\ || |   / __\___  _   _  ___| |__    /   \/ __\
       / \// || |_ / /  / _ \| | | |/ __| '_ \  / /\ /__\//
      / _  \__   _/ /__| (_) | |_| | (__| | | |/ /_// \/  \
      \/ \_/  |_| \____/\___/ \__,_|\___|_| |_/___,'\_____/

A Collection of R functions for CouchDB access

The R4CouchDB package provides a collection of functions for basic database and document management operations such as add, get and delete.

Note: Check out sofa, from @recology_ another R package to interact with CouchDB.

Note: I added a example of R4CouchDB usage to the (new) CouchDB wiki

Literature

The R4CouchDB package is reviewed in the book XML and Web Technologies for Data Sciences with R by Deborah Nolan and Duncan Temple Lang published in 2014 on Springer.

Credits

  • Thanks to @parisni for the contribution of cdbAddDocS()

Overview

Every cdbFunction() gets and returns a list() containing the complete connection setup and the data. With the command

R> conn <- cdbIni()

such a list() can be generated. It contains some default values e.g. the

R> conn$serverName
R> [1] "localhost"

or

R> conn$digits
R> [1] 7

With a database running at http://localhost:5984 the R-command:

R> cdbListDB( cdbIni() )

lists the databases available at localhost.

Getting started

R> install.packages("R4CouchDB")
R> library(R4CouchDB)
  • generate a connection object (a simple list()) with:
R> conn <- cdbIni()
  • play around with conn
R> conn$queryParam <- "count=10"
R> cdbGetUuidS(conn)$res
  • see test session in the example folder
  • write a issue

Tests

The functions in the tests folder assume a writable CouchDB instance running on http://localhost:5984:

$> cd R4CouchDB/tests 
$> R -f run.r

About

Collection of functions 4 R and CouchDB interaction

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages