Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

now we have roxygen documentation

	geändert:   R4CouchDB/DESCRIPTION
	neue Datei:   R4CouchDB/NAMESPACE
	geändert:   R4CouchDB/R/cdbAddAttachment.R
	geändert:   R4CouchDB/R/cdbAddDoc.R
	geändert:   R4CouchDB/R/cdbGetDoc.R
	geändert:   R4CouchDB/R/cdbGetUuidS.R
	geändert:   R4CouchDB/R/cdbIni.R
	geändert:   R4CouchDB/R/cdbUpdateDoc.R
	gelöscht:    R4CouchDB/man/R4CouchDB-package.Rd
	geändert:   R4CouchDB/man/cdbAddAttachment.Rd
	geändert:   R4CouchDB/man/cdbAddDoc.Rd
	geändert:   R4CouchDB/man/cdbDeleteDoc.Rd
	geändert:   R4CouchDB/man/cdbGetConfig.Rd
	geändert:   R4CouchDB/man/cdbGetDoc.Rd
	geändert:   R4CouchDB/man/cdbGetList.Rd
	geändert:   R4CouchDB/man/cdbGetUuid.Rd
	geändert:   R4CouchDB/man/cdbGetUuidS.Rd
	geändert:   R4CouchDB/man/cdbGetView.Rd
	geändert:   R4CouchDB/man/cdbIni.Rd
	geändert:   R4CouchDB/man/cdbListDB.Rd
	geändert:   R4CouchDB/man/cdbMakeDB.Rd
	geändert:   R4CouchDB/man/cdbRemoveDB.Rd
	geändert:   R4CouchDB/man/cdbUpdateDoc.Rd
	neue Datei:   R4CouchDB_0.1.1.tar.gz
	geändert:   R4CouchDB_0.1.tar.gz
  • Loading branch information...
commit 07263af60321666b4f4fe0873c0444d93fef9c43 1 parent 2da1665
@wactbprot authored
View
33 R4CouchDB/DESCRIPTION 100755 → 100644
@@ -1,14 +1,33 @@
Package: R4CouchDB
Type: Package
-Title: Collection of R functions for CouchDB access
-Version: 0.1
-Date: 2012/10/01
+Title: A R convenience layer for CouchDB
+Version: 0.1.1
+Date: 2012/10/13
Author: wactbprot
Maintainer: <thsteinbock@web.de>
Description: The R4CouchDB package provides a collection of functions for
- basic database and document management operations such as add and
- delete. Every cdbFunction() gets and emits a list containing the
- connection set up. Such a list can be generated by cdbIni().
+ basic database and document management operations such as add and
+ delete. Every cdbFunction() gets and emits a list containing the
+ connection set up. Such a list can be generated by cdbIni().
License: BSD
LazyLoad: yes
-Depends: R (>= 2.7.0), bitops, RCurl(>= 1.6), RJSONIO (>= 0.95)
+Depends:
+ R (>= 2.7.0),
+ bitops,
+ RCurl(>= 1.6),
+ RJSONIO (>= 0.95)
+Collate:
+ 'cdbAddAttachment.R'
+ 'cdbAddDoc.R'
+ 'cdbDeleteDoc.R'
+ 'cdbGetConfig.R'
+ 'cdbGetDoc.R'
+ 'cdbGetList.R'
+ 'cdbGetUuid.R'
+ 'cdbGetUuidS.R'
+ 'cdbGetView.R'
+ 'cdbIni.R'
+ 'cdbListDB.R'
+ 'cdbMakeDB.R'
+ 'cdbRemoveDB.R'
+ 'cdbUpdateDoc.R'
View
12 R4CouchDB/NAMESPACE
@@ -0,0 +1,12 @@
+export(cdbAddDoc)
+export(cdbDeleteDoc)
+export(cdbGetConfig)
+export(cdbGetDoc)
+export(cdbGetList)
+export(cdbGetUuid)
+export(cdbGetUuidS)
+export(cdbGetView)
+export(cdbListDB)
+export(cdbMakeDB)
+export(cdbRemoveDB)
+export(cdbUpdateDoc)
View
35 R4CouchDB/R/cdbAddAttachment.R
@@ -12,34 +12,7 @@
#' \code{cdb$id}.
#' @return \item{cdb}{The result is stored in \code{cdb$res} }
#' @author wactbprot
-#' @export
#' @keywords misc
-#' @examples
-#'
-#'
-#'# make a png (stolen from ?persp)
-#' x <- seq(-10, 10, length= 30)
-#' y <- x
-#' f <- function(x,y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
-#' z <- outer(x, y, f)
-#' z[is.na(z)] <- 1
-#' op <- par(bg = "white")
-#'
-#' cdb <- cdbIni()
-#' cdb$serverName <- "localhost"
-#'
-#' cdb$DBName <- "r4couchdb" ## should already exist
-#' cdb$fileName <- paste("../",cdb$DBName,".test.png", sep="")
-#' cdb$dataList <- list(data=list(x=x,y=y,z=z),
-#' date=cdb$date)
-#' cdb <- cdbAddDoc(cdb)
-#'
-#' png(filename=cdb$fileName)
-#' persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")
-#' dev.off()
-#'
-#' ## finaly the reason why we are here:
-#' cdb <- cdbAddAttachment(cdb)
#'
cdbAddAttachment <- function( cdb){
@@ -66,9 +39,11 @@ cdbAddAttachment <- function( cdb){
res <- getURL(adrString,
customrequest = "PUT",
postfields = data,
- httpheader=c('Content-Type' = paste("image/",tmpFn[tmpN],sep="")),
- curl=cdb$curl,
- .opts =cdb$opts(cdb)
+ httpheader=c("Content-Type"=paste("image/",
+ tmpFn[tmpN],
+ sep="")),
+ curl = cdb$curl,
+ .opts = cdb$opts(cdb)
)
return(cdb$checkRes(cdb,res))
View
7 R4CouchDB/R/cdbAddDoc.R
@@ -18,13 +18,6 @@
#' @export
#' @seealso \code{cdbGetDoc()}
#' @keywords misc
-#' @examples
-#'
-#' ccc <- cdbIni()
-#' ccc$DBName <- "r4couchdb" ## should already exist
-#' ccc$dataList <- list(normalDistRand = rnorm(20))
-#'
-#' cdbAddDoc(ccc)$res
#'
cdbAddDoc <- function( cdb){
View
7 R4CouchDB/R/cdbGetDoc.R
@@ -23,12 +23,7 @@
#'
#' \url{ http://couchdb.apache.org/ } \url{ http://www.omegahat.org/ }
#' @keywords misc
-#' @examples
-#'
-#' ccc <- cdbIni()
-#' ccc$DBName <- "r4couchdb" ## should already exist
-#' ccc$dataList <- list(normalDistRand = rnorm(20))
-#' ccc <- cdbAddDoc(ccc)
+#'
cdbGetDoc <- function(cdb){
View
5 R4CouchDB/R/cdbGetUuidS.R
@@ -21,11 +21,6 @@
#' \url{ http://www.omegahat.org/RCurl/ } \url{
#' http://www.omegahat.org/RJSONIO/ } \url{ http://couchdb.apache.org/ }
#' @keywords misc
-#' @examples
-#'
-#' ccc <- cdbIni()
-#' ccc$queryParam <- "count=10"
-#' cdbGetUuidS(ccc)$res
#'
cdbGetUuidS <- function(cdb){
View
4 R4CouchDB/R/cdbIni.R
@@ -8,11 +8,13 @@
#' successfully loaded.
#'
#' @usage cdbIni(serverName="localhost",port="5984",dbname="")
+#' @param serverName server name
+#' @param port port
+#' @param dbname name of database
#' @return
#'
#' \item{cdb}{see details for the default settings of this function }
#' @author wactbprot
-#' @export
#' @keywords misc
cdbIni <- function(serverName="localhost",port="5984",dbname=""){
View
7 R4CouchDB/R/cdbUpdateDoc.R
@@ -29,13 +29,6 @@
#' @references \url{ http://www.omegahat.org/RCurl/ } \url{
#' http://www.omegahat.org/RJSONIO/ } \url{ http://couchdb.apache.org/ }
#' @keywords misc
-#' @examples
-#'
-#' ccc <- cdbIni()
-#' ccc$DBName <- "r4couchdb" ## database should already exist
-#' ccc$dataList <- list(normalDistRand = rnorm(20))
-#' ccc <- cdbAddDoc(ccc)
-#' cdbUpdateDoc(ccc)$res
#'
cdbUpdateDoc <- function( cdb){
View
57 R4CouchDB/man/R4CouchDB-package.Rd
@@ -1,57 +0,0 @@
-\name{R4CouchDB-package}
-\Rdversion{1.1}
-\alias{R4CouchDB-package}
-\alias{R4CouchDB}
-\docType{package}
-\title{
-Collection of R functions for CouchDB access
-}
-\description{The R4CouchDB package provides a collection of functions for
-basic database and document management operations such as add and
-delete.
-}
-\details{
-\tabular{ll}{
-Package: \tab R4CouchDB\cr
-Type: \tab Package\cr
-Version: \tab 0.09\cr
-Date: \tab 2011-09-10\cr
-License: \tab BSD\cr
-LazyLoad: \tab yes\cr
-}
-All functions belonging to this package are written in R.
-Every \code{cdbFunction()} gets and emits a list containing the connection
-set up.
-This \code{list()} is called \code{cdb} in the source files. The result
-of each requests, the CouchDB answers, are stored in the
-\code{cdb$res}.
-
-The function \code{cdbIni()} initially provides
-a basic \code{cdb} list. The two basic \code{cdb} settings set by
-\code{cdbIni()} are \code{cdb$prot <- "http"} and
-\code{cdb$port <- "5984"}. Moreover it is simple to change this defaults direct
-in the source code of \code{cdbIni()} and rebuild the package using
-\code{R CMD check R4CouchDB} followed by a \code{build} and \code{INSTALL}.
-(see "Appendix B Invoking R" of "An Introduction to R" at
-\url{http://www.r-project.org}).
-
-To overcome requirement to have a running couchdb at localhost, all
-example sections in the functions descriptions are removed. Have a look
-in the demo folder to find some examples. There are also some comments.
-
-The http connection and the json transformations are done with Duncan
-Temple Langs RCurl and RJSON where this package depends on.
-Many thanks to him.
-}
-\author{
-wactbprot
-
-Maintainer: thsteinbock|at|web.de
-}
-\references{
- \url{ http://r-project.org/}
- \url{ http://www.omegahat.org/RCurl/}
- \url{ http://www.omegahat.org/RJSONIO/}
- \url{ http://couchdb.apache.org/}
-}
-\keyword{ package }
View
39 R4CouchDB/man/cdbAddAttachment.Rd 100755 → 100644
@@ -1,37 +1,28 @@
\name{cdbAddAttachment}
-\Rdversion{1.1}
\alias{cdbAddAttachment}
-
-\title{
-Add Attachments
-}
-\description{
- This function adds attachments to a doc
-
-}
+\title{Add attachments}
\usage{
-cdbAddAttachment(cdb)
+ cdbAddAttachment(cdb)
}
-
\arguments{
- \item{cdb}{The list \code{cdb} has to contain
- \code{cdb$fileName},\code{cdb$serverName}, \code{cdb$DBName} and a \code{cdb$id}.
+ \item{cdb}{The list \code{cdb} has to contain
+ \code{cdb$fileName},\code{cdb$serverName},
+ \code{cdb$DBName} and a \code{cdb$id}.}
}
-}
-\details{
-The function uses a simple call to \code{strsplit(fileName, ".")} and
-takes the last entry of the resulting vector as the \code{Content-Type} in
-the \code{httpheader}.
-}
-
\value{
- \item{cdb}{The result is stored in \code{cdb$res}
+ \item{cdb}{The result is stored in \code{cdb$res} }
}
+\description{
+ This function adds attachments to a doc.
+}
+\details{
+ The function uses a simple call to
+ \code{strsplit(fileName, ".")} and takes the last entry
+ of the resulting vector as the \code{Content-Type} in the
+ \code{httpheader}.
}
\author{
wactbprot
}
-
-
-\keyword{ misc }
+\keyword{misc}
View
49 R4CouchDB/man/cdbAddDoc.Rd 100755 → 100644
@@ -1,44 +1,37 @@
\name{cdbAddDoc}
-\Rdversion{1.1}
\alias{cdbAddDoc}
-
-\title{
-Generates a new document
-}
-\description{
- This function adds a new document to an already existing database
-
-}
+\title{Generates a new document}
\usage{
-cdbAddDoc(cdb)
+ cdbAddDoc(cdb)
}
-
\arguments{
\item{cdb}{The list \code{cdb} only has to contain a
- \code{cdb$dataList} which is not an empty \code{list()}.
-}
+ \code{cdb$dataList} which is not an empty \code{list()}.}
}
-\details{
-This function is called addDoc (which means add a new
- document). Therefore the
- \code{cdb$id} is requested using \code{cdbGetUuid()} for every document
- to add if no \code{cdb$id} is provided. If a \code{cdb$id} is provided
- the function fails when a document with the given id already
- exists. In this case one should use \code{cdbUpdateDoc()}.
-Since version v0.6 the function writes the \code{_rev} and \code{_id}
- key to the top level of \code{cdb$dataList}.
-}
-
\value{
- \item{cdb}{The couchdb response is stored in \code{cdb$res}
+ \item{cdb}{The couchdb response is stored in
+ \code{cdb$res} }
}
+\description{
+ This function adds a new document to an already existing
+ database
+}
+\details{
+ This function is called addDoc (which means add a new
+ document). Therefore the \code{cdb$id} is requested using
+ \code{cdbGetUuid()} for every document to add if no
+ \code{cdb$id} is provided. If a \code{cdb$id} is provided
+ the function fails when a document with the given id
+ already exists. In this case one should use
+ \code{cdbUpdateDoc()}. Since version v0.6 the function
+ writes the \code{_rev} and \code{_id} key to the top
+ level of \code{cdb$dataList}.
}
\author{
wactbprot
}
\seealso{
-\code{cdbGetDoc()}
+ \code{cdbGetDoc()}
}
-
-\keyword{ misc }
+\keyword{misc}
View
45 R4CouchDB/man/cdbDeleteDoc.Rd 100755 → 100644
@@ -1,43 +1,32 @@
\name{cdbDeleteDoc}
-\Rdversion{1.1}
\alias{cdbDeleteDoc}
-
-\title{
-Deletes a document from a database
-}
-\description{
- With a given \code{cdb$id} this function sends a http \code{"DELETE"}
- request to the url \code{.../cdb$id?rev=cdb$rev}.
-}
+\title{Deletes a document from a database}
\usage{
-cdbDeleteDoc(cdb)
+ cdbDeleteDoc(cdb)
}
-
\arguments{
- \item{cdb}{Beside \code{cdb$serverName}, \code{cdb$port} and
- \code{cdb$DBName} the \code{cdb$id} must be given. R errors are
- reported in \code{cdb$errors}
-}
+ \item{cdb}{Beside \code{cdb$serverName}, \code{cdb$port}
+ and \code{cdb$DBName} the \code{cdb$id} must be given. R
+ errors are reported in \code{cdb$errors}}
}
\value{
-
\item{cdb }{The result of the delete request is stored in
- \code{cdb$res}(whatever this means).
- }
- }
-\references{
-
-\url{ http://couchdb.apache.org/ }
-\url{ http://www.omegahat.org/ }
-
+ \code{cdb$res}(whatever this means). }
+}
+\description{
+ With a given \code{cdb$id} this function sends a http
+ \code{"DELETE"} request to the url
+ \code{.../cdb$id?rev=cdb$rev}.
}
\author{
wactbprot
}
-
+\references{
+ \url{ http://couchdb.apache.org/ } \url{
+ http://www.omegahat.org/ }
+}
\seealso{
-\code{cdbAddDoc()}
+ \code{cdbAddDoc()}
}
-
-\keyword{ misc }
+\keyword{misc}
View
43 R4CouchDB/man/cdbGetConfig.Rd
@@ -1,39 +1,32 @@
\name{cdbGetConfig}
-\Rdversion{1.1}
\alias{cdbGetConfig}
-
-\title{
-Request couchdb config
-}
-\description{
-Function provides access to the \code{_config} api end point
+\title{Request couchdb config}
+\usage{
+ cdbGetConfig(cdb)
}
-
\arguments{
- \item{cdb}{ Only the connection settings \code{cdb$port} and
- \code{cdb$serverName} is needed.
+ \item{cdb}{Only the connection settings \code{cdb$port}
+ and \code{cdb$serverName} is needed.}
}
-}
-
\value{
-
- \item{cdb }{The result of the request is stored in \code{cdb$re} after
- converting the answer into a list using \code{fromJSON()}.
- }
+ \item{cdb }{The result of the request is stored in
+ \code{cdb$re} after converting the answer into a list
+ using \code{fromJSON()}. }
}
-\references{
-
- \url{ http://www.omegahat.org/RCurl/ }
- \url{ http://www.omegahat.org/RJSONIO/ }
- \url{ http://couchdb.apache.org/ }
-
+\description{
+ Function provides access to the \code{_config} api end
+ point
}
\author{
wactbprot
}
-
+\references{
+ \url{ http://www.omegahat.org/RCurl/ } \url{
+ http://www.omegahat.org/RJSONIO/ } \url{
+ http://couchdb.apache.org/ }
+}
\seealso{
-\code{cdbMakeDB}
+ \code{cdbMakeDB}
}
-\keyword{ misc }
+\keyword{misc}
View
50 R4CouchDB/man/cdbGetDoc.Rd 100755 → 100644
@@ -1,46 +1,38 @@
\name{cdbGetDoc}
-\Rdversion{1.1}
\alias{cdbGetDoc}
-
-\title{
-Get a doc from CouchDB
-}
-\description{
- With a given \code{cdb$id} this function requests the document.
-}
+\title{Get a doc from CouchDB}
\usage{
-cdbGetDoc(cdb)
+ cdbGetDoc(cdb)
}
-%- maybe also 'usage' for other objects documented here.
\arguments{
- \item{cdb}{Beside \code{cdb$serverName}, \code{cdb$port} and
- \code{cdb$DBName} the \code{cdb$id} must be given. R errors are
- reported
+ \item{cdb}{Beside \code{cdb$serverName}, \code{cdb$port}
+ and \code{cdb$DBName} the \code{cdb$id} must be given. R
+ errors are reported
- in cdb$errors
-}
+ in cdb$errors}
}
\value{
-
- \item{cdb }{The result of the request is stored in \code{cdb$res} after
- converting the answer into a list using \code{fromJSON()}. If a list
- entry needed in \code{cdb} is not provided \code{cdb$error}
- gives some information.
+ \item{cdb }{The result of the request is stored in
+ \code{cdb$res} after converting the answer into a list
+ using \code{fromJSON()}. If a list entry needed in
+ \code{cdb} is not provided \code{cdb$error} gives some
+ information.
}
- }
-\references{
-
-\url{ http://couchdb.apache.org/ }
-\url{ http://www.omegahat.org/ }
-
+}
+\description{
+ With a given \code{cdb$id} this function requests the
+ document.
}
\author{
wactbprot
}
-
+\references{
+ \url{ http://couchdb.apache.org/ } \url{
+ http://www.omegahat.org/ }
+}
\seealso{
-\code{cdbAddDoc()}
+ \code{cdbAddDoc()}
}
+\keyword{misc}
-\keyword{ misc }
View
60 R4CouchDB/man/cdbGetList.Rd
@@ -1,47 +1,41 @@
\name{cdbGetList}
-\Rdversion{1.1}
\alias{cdbGetList}
-
-\title{
-Receive list results from CouchDB
-}
-\description{
-The function provides accesses to CouchDB lists.
-}
+\title{Receive list results from CouchDB}
\usage{
-cdbGetList(cdb)
+ cdbGetList(cdb)
}
-
\arguments{
- \item{cdb}{ Beside the connection details
- (\code{cdb$port},\code{cdb$DAName} ...) the \code{cdb$design}
- \code{cdb$view} and \code{cdb$list} is needed.
-
-}
-}
-\details{
-Query params e.g. \code{"reduce=false"} or \code{"group_level=1"} can
-be provided in \code{cdb$queryParam}
-By now multible params must be given in one string e.g. \code{"a=b&c=d&e=f"}.
-
+ \item{cdb}{Beside the connection details
+ (\code{cdb$port},\code{cdb$DAName} ...) the
+ \code{cdb$design} \code{cdb$view} and \code{cdb$list} is
+ needed.}
}
\value{
+ \item{cdb }{The result of the request is stored in
+ cdb$res after converting the json answer into a list
+ using fromJSON(). If a needed cdb (design, list, view,
+ ...) entry was not provided cdb$error says something
+ about the R side.
- \item{cdb }{The result of the request is stored in cdb$res after
- converting the json answer into a list using fromJSON(). If a needed
- cdb (design, list, view, ...) entry was not provided cdb$error
- says something about the R side.
-
- }
+ }
}
-\references{
-\url{ http://www.omegahat.org/RCurl }
-\url{ http://www.omegahat.org/RJSONIO }
-\url{ http://couchdb.apache.org }
-\url{ http://www.omegahat.org/RJavaScript }
+\description{
+ The function provides accesses to CouchDB lists.
+}
+\details{
+ Query params e.g. \code{"reduce=false"} or
+ \code{"group_level=1"} can be provided in
+ \code{cdb$queryParam} By now multible params must be
+ given in one string e.g. \code{"a=b&c=d&e=f"}.
}
\author{
wactbprot
}
+\references{
+ \url{ http://www.omegahat.org/RCurl } \url{
+ http://www.omegahat.org/RJSONIO } \url{
+ http://couchdb.apache.org } \url{
+ http://www.omegahat.org/RJavaScript }
+}
+\keyword{misc}
-\keyword{ misc }
View
48 R4CouchDB/man/cdbGetUuid.Rd
@@ -1,41 +1,35 @@
\name{cdbGetUuid}
-\Rdversion{1.1}
\alias{cdbGetUuid}
-
-\title{
-Function for request one id
-}
-\description{
-Function returns a 128bit uuid requested from CouchDB
+\title{Function for request one id}
+\usage{
+ cdbGetUuid(cdb)
}
-
\arguments{
- \item{cdb}{ Only the connection settings \code{cdb$port} and
- \code{cdb$serverName} is needed.
-}
-}
-\details{
-Simple CouchDB API end point to http://serverName:port/_uuids.
+ \item{cdb}{Only the connection settings \code{cdb$port}
+ and \code{cdb$serverName} is needed.}
}
\value{
-
- \item{cdb }{The result of the request is stored in \code{cdb$id} after
- converting the answer into a list using \code{fromJSON()}.
- }
+ \item{cdb }{The result of the request is stored in
+ \code{cdb$id} after converting the answer into a list
+ using \code{fromJSON()}.}
}
-\references{
-
- \url{ http://www.omegahat.org/RCurl/ }
- \url{ http://www.omegahat.org/RJSONIO/ }
- \url{ http://couchdb.apache.org/ }
-
+\description{
+ Function returns a 128bit uuid requested from CouchDB
+}
+\details{
+ Simple CouchDB API end point to
+ http://serverName:port/_uuids.
}
\author{
wactbprot
}
-
+\references{
+ \url{ http://www.omegahat.org/RCurl/ } \url{
+ http://www.omegahat.org/RJSONIO/ } \url{
+ http://couchdb.apache.org/ }
+}
\seealso{
-\code{cdbMakeDB}
+ \code{cdbMakeDB}
}
-\keyword{ misc }
+\keyword{misc}
View
56 R4CouchDB/man/cdbGetUuidS.Rd
@@ -1,45 +1,39 @@
\name{cdbGetUuidS}
-\Rdversion{1.1}
\alias{cdbGetUuidS}
-
-\title{
-Function for request a number of ids
-}
-\description{
-Function returns a 128bit uuid requested from CouchDB
+\title{Function for request a number of ids}
+\usage{
+ cdbGetUuidS(cdb)
}
-
\arguments{
- \item{cdb}{ Only the connection settings \code{cdb$port} and
- \code{cdb$serverName} is needed.
-}
-}
-\details{
-Simple CouchDB API end point to http://serverName:port/_uuids. The
- number N of ids received from a CouchDB can be set by
- \code{cdb$queryParam <- paste("count=", N, sep="")}.
- The function writes to cdb$res (in opposite to \code{cdbGetUuid()}
- whitch writes to \code{cdb$id})
+ \item{cdb}{Only the connection settings \code{cdb$port}
+ and \code{cdb$serverName} is needed.}
}
\value{
-
- \item{cdb }{The result of the request is stored in \code{cdb$res} after
- converting the answer into a list using \code{fromJSON()}.
- }
+ \item{cdb }{The result of the request is stored in
+ \code{cdb$res} after converting the answer into a list
+ using \code{fromJSON()}. }
}
-\references{
-
- \url{ http://www.omegahat.org/RCurl/ }
- \url{ http://www.omegahat.org/RJSONIO/ }
- \url{ http://couchdb.apache.org/ }
+\description{
+ Function returns a 128bit uuid requested from CouchDB
+}
+\details{
+ Simple CouchDB API end point to
+ http://serverName:port/_uuids. The number N of ids
+ received from a CouchDB can be set by
+ \code{cdb$queryParam <- paste("count=", N, sep="")}. The
+ function writes to cdb$res (in opposite to
+ \code{cdbGetUuid()} whitch writes to \code{cdb$id})
}
-
\author{
wactbprot
}
-
+\references{
+ \url{ http://www.omegahat.org/RCurl/ } \url{
+ http://www.omegahat.org/RJSONIO/ } \url{
+ http://couchdb.apache.org/ }
+}
\seealso{
-\code{cdbMakeDB}
+ \code{cdbMakeDB}
}
-\keyword{ misc }
+\keyword{misc}
View
65 R4CouchDB/man/cdbGetView.Rd 100755 → 100644
@@ -1,52 +1,43 @@
\name{cdbGetView}
-\Rdversion{1.1}
\alias{cdbGetView}
-
-\title{
-Receive view results from CouchDB
-}
-\description{
-The function provides accesses to CouchDB views.
-}
+\title{Receive view results from CouchDB}
\usage{
-cdbGetView(cdb)
+ cdbGetView(cdb)
}
-
\arguments{
- \item{cdb}{ Beside the connection details
- (\code{cdb$port},\code{cdb$DAName} ...) the \code{cdb$design} and
- \code{cdb$view} is needed.
+ \item{cdb}{Beside the connection details
+ (\code{cdb$port},\code{cdb$DAName} ...) the
+ \code{cdb$design} and \code{cdb$view} is needed.}
+}
+\value{
+ \item{cdb }{The result of the request is stored in
+ cdb$res after converting the json answer into a list
+ using fromJSON(). If a needed cdb list entry was not
+ provided cdb$error says something about the R side
+ }
}
+\description{
+ The function provides accesses to CouchDB views.
}
\details{
-Query params e.g. \code{"reduce=false"} or \code{"group_level=1"} can
-be provided in \code{cdb$queryParam}
-}
-\value{
-
- \item{cdb }{The result of the request is stored in cdb$res after
- converting the json answer into a list using fromJSON(). If a needed
- cdb list entry was not provided cdb$error says something about the R
- side
-
- }
+ Query params e.g. \code{"reduce=false"} or
+ \code{"group_level=1"} can be provided in
+ \code{cdb$queryParam}
}
-\references{
-
-\url{ http://www.omegahat.org/RCurl/ }
-\url{ http://www.omegahat.org/RJSONIO/ }
-\url{ http://couchdb.apache.org/ }
-\url{ http://www.omegahat.org/RJavaScript/ }
+\note{
+ For the moment only one \code{cdb$queryParam} is
+ possible. In the future maybe Duncans \code{RJavaScript}
+ package can be used to generate views without leaving R.
}
\author{
wactbprot
}
-
-
-\note{
-For the moment only one \code{cdb$queryParam} is possible. In the future
-maybe Duncans \code{RJavaScript} package can be used to generate views
-without leaving R.
+\references{
+ \url{ http://www.omegahat.org/RCurl/ } \url{
+ http://www.omegahat.org/RJSONIO/ } \url{
+ http://couchdb.apache.org/ } \url{
+ http://www.omegahat.org/RJavaScript/ }
}
-\keyword{ misc }
+\keyword{misc}
+
View
41 R4CouchDB/man/cdbIni.Rd 100755 → 100644
@@ -1,36 +1,31 @@
\name{cdbIni}
-\Rdversion{1.1}
\alias{cdbIni}
-
-\title{
-Ini function
-}
-\description{
-Function returns a list with some default settings
-}
+\title{Ini function}
\usage{
-cdbIni(serverName="localhost",port="5984",dbname="")
+ cdbIni(serverName="localhost",port="5984",dbname="")
}
\arguments{
- \item{serverName}{The servername as it fits in the scheme
- \code{http://serverName:port/dbname/...} (optional)}
- \item{port}{The port as it fits in the scheme
- \code{http://serverName:port/dbname/...}(optional)}
- \item{dbname}{The database name as it fits in the scheme
- \code{http://serverName:port/dbname/...}(optional)}
+ \item{serverName}{server name}
-}
-\details{
- The list:
- \code{cdb <- list(serverName = "localhost", ... )}
- is returned if the packages \code{library(RCurl)} and
-\code{library(RJSONIO)} are successfully loaded.
+ \item{port}{port}
+
+ \item{dbname}{name of database}
}
\value{
- \item{cdb}{A conection object (a list) is returned.}
+ \item{cdb}{see details for the default settings of this
+ function }
+}
+\description{
+ Function returns a list with some default settings and
+ often used functions such as \code{cdb$baseUrl}.
+}
+\details{
+ The list: \code{ cdb <- list(serverName = "localhost",
+ ... )} is returned if the packages \code{library(RCurl)}
+ and \code{library(RJSONIO)} are successfully loaded.
}
\author{
wactbprot
}
-\keyword{ misc }
+\keyword{misc}
View
50 R4CouchDB/man/cdbListDB.Rd 100755 → 100644
@@ -1,44 +1,36 @@
\name{cdbListDB}
-\Rdversion{1.1}
\alias{cdbListDB}
-
-\title{
-Returns all databases on the server
-}
-\description{
-Gives a list of all databases
-}
+\title{Returns all databases on the server}
\usage{
-cdbListDB(cdb)
+ cdbListDB(cdb)
}
-
\arguments{
- \item{cdb}{ Only the connection settings \code{cdb$port} and
- \code{cdb$serverName} is needed.
+ \item{cdb}{Only the connection settings \code{cdb$port}
+ and \code{cdb$serverName} is needed.}
}
+\value{
+ \item{cdb }{The result of the request is stored in
+ cdb$res after converting the json answer into a list
+ using \code{cdb$fromJSON()}.}
}
-\details{
-Simple CouchDB API end point: \url{http://localhost:5984/_all_dbs}
+\description{
+ Gives a list of all databases available at
+ \code{cdb$serverName}.
}
-\value{
-
- \item{cdb }{The result of the request is stored in cdb$res after
- converting the json answer into a list using \code{fromJSON()}.
- }
- }
-\references{
-
- \url{ http://www.omegahat.org/RCurl/ }
- \url{ http://www.omegahat.org/RJSONIO/ }
- \url{ http://couchdb.apache.org/ }
-
+\details{
+ The function uses the CouchDB API end point:
+ \url{http://localhost:5984/_all_dbs}
}
\author{
wactbprot
}
-
+\references{
+ \url{ http://www.omegahat.org/RCurl/ } \url{
+ http://www.omegahat.org/RJSONIO/ } \url{
+ http://couchdb.apache.org/ }
+}
\seealso{
-\code{cdbMakeDB}
+ \code{cdbMakeDB}
}
+\keyword{misc}
-\keyword{ misc }
View
54 R4CouchDB/man/cdbMakeDB.Rd 100755 → 100644
@@ -1,47 +1,43 @@
\name{cdbMakeDB}
-\Rdversion{1.1}
\alias{cdbMakeDB}
-
-\title{
-Creates a new database
-}
-\description{
- The name of the new database is taken from \code{cdb$newDBName}.
-}
+\title{Creates a new database}
\usage{
-cdbMakeDB(cdb)
+ cdbMakeDB(cdb)
}
-
\arguments{
- \item{cdb}{The \code{cdb} have to provide \code{cdb$serverName},
- \code{cdb$port} and \code{cdb$newDBName}
-}
-}
-\details{
- The work is done by \code{getURL()}.
-
- After creating the new database
- the function makes the shortcut \code{cdb$DBName <- cdb$newDBName} so
- that further operations happen on the new created database. Then
- \code{cdb$newDBName <- ""} happens.
+ \item{cdb}{The \code{cdb} have to provide
+ \code{cdb$serverName}, \code{cdb$port} and
+ \code{cdb$newDBName}}
}
\value{
- \item{cdb}{The CouchDB answer is stored in \code{cdb$res}. Any
- problems on the R side are reported in \code{cdb$error}
+ \item{cdb}{The CouchDB answer is stored in
+ \code{cdb$res}. Any problems on the R side are reported
+ in \code{cdb$error} }
}
+\description{
+ The name of the new database is taken from
+ \code{cdb$newDBName}.
}
-\references{
- \url{ http://couchdb.apache.org/ }
+\details{
+ The work is done by \code{getURL()} from Duncans RCurl
+ package.
+
+ After creating the new database the function makes the
+ shortcut \code{cdb$DBName <- cdb$newDBName} so that
+ further operations happen on the new created database.
+ Finaly \code{cdb$newDBName <- ""}.
+}
+\note{
+ The convention for database naming should be implemented.
}
\author{
wactbprot
}
-
-\note{
- The convention for database naming should be implemented.
+\references{
+ \url{ http://couchdb.apache.org/ }
}
-
\seealso{
\code{cdbUpdateDoc}
}
\keyword{misc}
+
View
52 R4CouchDB/man/cdbRemoveDB.Rd 100755 → 100644
@@ -1,44 +1,36 @@
\name{cdbRemoveDB}
-\Rdversion{1.1}
\alias{cdbRemoveDB}
-
-\title{
-Function to remove a database.
-}
-\description{
-Removing a database means sending a http- "DELETE"- request to
-\code{http://cdb$serverName:cdb$port/ ...}
-}
+\title{Function to remove a database}
\usage{
-cdbRemoveDB(cdb)
+ cdbRemoveDB(cdb)
}
-
\arguments{
-
- \item{cdb}{The \code{cdb} has to provide \code{cdb$serverName},
- \code{cdb$port} and \code{cdb$DBName}
+ \item{cdb}{The \code{cdb} has to provide
+ \code{cdb$serverName}, \code{cdb$port} and
+ \code{cdb$DBName}}
}
-
+\value{
+ \item{cdb}{The CouchDB answer is stored in
+ \code{cdb$res}. Any problems on the R side are reportet
+ in \code{cdb$error} }
+}
+\description{
+ Removing a database means sending a http- "DELETE"-
+ request to \code{http://cdb$serverName:cdb$port/ ...}
}
-
\details{
- In \code{cdb} maybe a entry \code{cdb$delDBName} should be provided
- for more explicit deleting respectively more secure removing.
- }
- \value{
- \item{cdb}{The CouchDB answer is stored in \code{cdb$res}. Any
- problems on the R side are reportet in \code{cdb$error}
+ In \code{cdb} a entry \code{cdb$delDBName} should be
+ provided for more explicit deleting respectively more
+ secure removing.
}
+\author{
+ wactbprot
}
\references{
-\url{ http://couchdb.apache.org/ }
+ \url{ http://couchdb.apache.org/ }
}
-\author{
- wactbprot
- }
-
- \seealso{
-\code{cdbMakeDB}
+\seealso{
+ \code{cdbMakeDB}
}
+\keyword{misc}
-\keyword{ misc }
View
78 R4CouchDB/man/cdbUpdateDoc.Rd 100755 → 100644
@@ -1,57 +1,51 @@
\name{cdbUpdateDoc}
-\Rdversion{1.1}
\alias{cdbUpdateDoc}
-
-\title{
-This function updates an existing doc. This
-essentially means that a revision, corresponding to the '_id'
-has to be provided. If no '_rev' is provided the function gets the doc
-fron the db and takes the revition number for the update
-}
-\description{
- Updating a doc at couchdb means executing a http "PUT" request. The \code{cdb}
- list must contain the \code{cdb$serverName}, \code{cdb$port},
- \code{cdb$DBName}, \code{cdb$id}. Since v0.6 the revision of the
- document should exist at the intended place;
- \code{cdb$dataList$'_rev'}.
-}
+\title{This function updates an existing doc}
\usage{
-cdbUpdateDoc(cdb)
+ cdbUpdateDoc(cdb)
}
-
\arguments{
- \item{cdb}{
- the cdb connection configuration list must contain the \code{cdb$serverName},
- \code{cdb$port}, \code{cdb$DBName} and \code{cdb$id}. The data which
- updates the data stored in the doc is provided in \code{cdb$dataList}
-}
-}
-\details{
- \code{getURL()} with \code{customrequest = "PUT"} does the work.
- If a needed
- \code{cdb$} list entry is not provided \code{cdb$error} maybe says
- something about the R side.
+ \item{cdb}{the cdb connection configuration list must
+ contain the \code{cdb$serverName}, \code{cdb$port},
+ \code{cdb$DBName} and \code{cdb$id}. The data which
+ updates the data stored in the doc is provided in
+ \code{cdb$dataList}}
}
\value{
- \item{cdb }{The response of the request is stored in \code{cdb$res} after
- converting the answer by means of \code{fromJSON()}. The revision
- provided by the respons is used for updating the \code{cdb$dataList$'_rev'}.
- }
-
-
+ \item{cdb }{The response of the request is stored in
+ \code{cdb$res} after converting the answer by means of
+ \code{fromJSON()}. The revision provided by the respons
+ is used for updating the \code{cdb$dataList$'_rev'}. }
}
-\references{
-\url{ http://www.omegahat.org/RCurl/ }
-\url{ http://www.omegahat.org/RJSONIO/ }
-\url{ http://couchdb.apache.org/ }
-
+\description{
+ This essentially means that a revision, corresponding to
+ the '_id' has to be provided. If no '_rev' is provided
+ the function gets the doc fron the db and takes the
+ revition number for the update
}
+\details{
+ Updating a doc at couchdb means executing a http "PUT"
+ request. The \code{cdb} list must contain the
+ \code{cdb$serverName}, \code{cdb$port},
+ \code{cdb$DBName}, \code{cdb$id}. Since v0.6 the revision
+ of the document should exist at the intended place;
+ \code{cdb$dataList$'_rev'}.
-
+ \code{getURL()} with \code{customrequest = "PUT"} does
+ the work. If a needed \code{cdb$} list entry is not
+ provided \code{cdb$error} maybe says something about the
+ R side.
+}
\author{
wactbprot
}
+\references{
+ \url{ http://www.omegahat.org/RCurl/ } \url{
+ http://www.omegahat.org/RJSONIO/ } \url{
+ http://couchdb.apache.org/ }
+}
\seealso{
-\code{cdbInit()}
+ \code{cdbInit()}
}
-\keyword{ misc }
+\keyword{misc}
+
View
BIN  R4CouchDB_0.1.1.tar.gz
Binary file not shown
View
BIN  R4CouchDB_0.1.tar.gz
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.