Changeset: 92b7413eddc2 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=92b7413eddc2 Removed Files: clients/R/MonetDB.R/man/monetdbGetTransferredBytes.Rd Modified Files: clients/R/MonetDB.R/DESCRIPTION clients/R/MonetDB.R/NAMESPACE clients/R/MonetDB.R/R/mapi.R clients/R/Tests/dbi.R clients/R/Tests/dplyr.R clients/R/Tests/install-dependencies.sh clients/R/Tests/install.sh clients/R/Tests/survey.R Branch: Oct2014 Log Message:
R Connector: Testing now installs package in TSTTRGDIR, removed bitops dependency (R-Core now has bitshift, yaaay) Unterschiede (154 Zeilen): diff --git a/clients/R/MonetDB.R/DESCRIPTION b/clients/R/MonetDB.R/DESCRIPTION --- a/clients/R/MonetDB.R/DESCRIPTION +++ b/clients/R/MonetDB.R/DESCRIPTION @@ -4,10 +4,11 @@ Title: Connect MonetDB to R Authors@R: c(person("Hannes Muehleisen", role = c("aut", "cre"),email = "han...@cwi.nl"), person("Thomas Lumley", role = "ctb"), person("Anthony Damico", role = "ctb")) -Depends: DBI (>= 0.3.1), digest (>= 0.6.4), bitops (>= 1.0), methods -Suggests: dplyr(>= 0.3) +Author: Hannes Muehleisen [aut, cre], Thomas Lumley [ctb], Anthony Damico [ctb] +Maintainer: Hannes Muehleisen <han...@cwi.nl> +Depends: DBI (>= 0.3.1), digest (>= 0.6.4), methods, R (>= 3.1.1) +Suggests: dplyr Description: Allows to pull data from MonetDB into R. Includes a DBI implementation and a dplyr backend. License: MPL (== 1.1) URL: http://monetr.r-forge.r-project.org -Maintainer: Hannes Muehleisen <han...@cwi.nl> SystemRequirements: MonetDB, available from http://www.monetdb.org \ No newline at end of file diff --git a/clients/R/MonetDB.R/NAMESPACE b/clients/R/MonetDB.R/NAMESPACE --- a/clients/R/MonetDB.R/NAMESPACE +++ b/clients/R/MonetDB.R/NAMESPACE @@ -1,4 +1,4 @@ -import(DBI,digest,methods,bitops) +import(DBI,digest,methods) # export only driver constructor, everything else is DBI stuff.. export(MonetDB,MonetR,MonetDBR,MonetDB.R) diff --git a/clients/R/MonetDB.R/R/mapi.R b/clients/R/MonetDB.R/R/mapi.R --- a/clients/R/MonetDB.R/R/mapi.R +++ b/clients/R/MonetDB.R/R/mapi.R @@ -134,8 +134,8 @@ REPLY_SIZE <- 100 # Apparently, -1 me stop("Empty response from MonetDB server, probably a timeout. You can increase the time to wait for responses with the 'timeout' parameter to 'dbConnect()'.") } - length <- bitShiftR(unpacked,1) - final <- bitAnd(unpacked,1) + length <- bitwShiftR(unpacked,1) + final <- bitwAnd(unpacked,1) if (length == 0) break resp <- c(resp,readChar(con, length, useBytes = TRUE)) @@ -167,7 +167,7 @@ REPLY_SIZE <- 100 # Apparently, -1 me bytes <- nchar(req) pos <- pos + bytes final <- max(nchar(msg) - pos,0) == 0 - header <- as.integer(bitOr(bitShiftL(bytes,1),as.numeric(final))) + header <- as.integer(bitwOr(bitwShiftL(bytes,1),as.numeric(final))) writeBin(header, con, 2,endian="little") writeChar(req,con,bytes,useBytes=TRUE,eos=NULL) } diff --git a/clients/R/MonetDB.R/man/monetdbGetTransferredBytes.Rd b/clients/R/MonetDB.R/man/monetdbGetTransferredBytes.Rd deleted file mode 100644 --- a/clients/R/MonetDB.R/man/monetdbGetTransferredBytes.Rd +++ /dev/null @@ -1,17 +0,0 @@ -\name{monetdbGetTransferredBytes} -\alias{monetdbGetTransferredBytes} - -\title{ - Get and reset MAPI traffic counters -} -\description{ - The MonetDB.R connector keeps track on the amount of bytes transferred to and from the database. - The counters are reset after this function is called. This is a developer feature and is not - very useful to typical users. -} -\usage{ - monetdbGetTransferredBytes () -} -\value{ - Returns a list with two entries, \code{bytes.in} and \code{bytes.out}. -} \ No newline at end of file diff --git a/clients/R/Tests/dbi.R b/clients/R/Tests/dbi.R --- a/clients/R/Tests/dbi.R +++ b/clients/R/Tests/dbi.R @@ -1,4 +1,8 @@ -library(MonetDB.R,quietly=T) +ll <- NULL +if (Sys.getenv("TSTTRGDIR") != "") { + ll <- paste0(Sys.getenv("TSTTRGDIR"),"/rlibdir") +} +library(MonetDB.R,quietly=T,lib.loc=ll) args <- commandArgs(trailingOnly = TRUE) dbport <- 50000 diff --git a/clients/R/Tests/dplyr.R b/clients/R/Tests/dplyr.R --- a/clients/R/Tests/dplyr.R +++ b/clients/R/Tests/dplyr.R @@ -1,5 +1,9 @@ library(dplyr,quietly=T) -library(MonetDB.R,quietly=T) +ll <- NULL +if (Sys.getenv("TSTTRGDIR") != "") { + ll <- paste0(Sys.getenv("TSTTRGDIR"),"/rlibdir") +} +library(MonetDB.R,quietly=T,lib.loc=ll) library(Lahman,quietly=T) options(monetdb.debug.query=T) @@ -9,10 +13,12 @@ dbname <- "mTests_clients_R" if (length(args) > 0) dbport <- args[[1]] +# old way if (exists("lahman_monetdb")) { # overwrite all args because lahman_monetdb sets a default arg in the first pos. srct <- function() lahman_monetdb(host="localhost", dbname=dbname, port=dbport , user="monetdb",password="monetdb",timeout=100,wait=T,language="sql") +# new way } else { srct <- function() src_monetdb(dbname=dbname, port=dbport) copy_lahman(srct()) diff --git a/clients/R/Tests/install-dependencies.sh b/clients/R/Tests/install-dependencies.sh --- a/clients/R/Tests/install-dependencies.sh +++ b/clients/R/Tests/install-dependencies.sh @@ -1,2 +1,2 @@ #!/bin/sh -R --vanilla --quiet -e "install.packages(c('MonetDB.R','dplyr','sqlsurvey'),repos=c('http://r-forge.r-project.org','http://cran.rstudio.com/'),type='source')" +R --vanilla --quiet -e "install.packages(c('dplyr','sqlsurvey','DBI','digest'),repos=c('http://r-forge.r-project.org','http://cran.rstudio.com/'),type='source')" diff --git a/clients/R/Tests/install.sh b/clients/R/Tests/install.sh --- a/clients/R/Tests/install.sh +++ b/clients/R/Tests/install.sh @@ -1,12 +1,11 @@ #!/bin/sh -# install dependencies first -# R --vanilla --quiet -e "install.packages(c('MonetDB.R','dplyr','sqlsurvey'),repos=c('http://r-forge.r-project.org','http://cran.rstudio.com/'),type='source')" - # install local version -R CMD INSTALL $TSTSRCDIR/../MonetDB.R >> /dev/null 2>&1 +RLIBDIR=$TSTTRGDIR/rlibdir +mkdir -p $RLIBDIR +R CMD INSTALL $TSTSRCDIR/../MonetDB.R -l $RLIBDIR >> /dev/null 2>&1 # try loading the required packages -R --vanilla --quiet -e "library(MonetDB.R); library(dplyr); library(sqlsurvey)" >> /dev/null 2>&1 +R --vanilla --quiet -e "library(MonetDB.R,lib.loc=\"$RLIBDIR\"); library(dplyr); library(sqlsurvey)" >> /dev/null 2>&1 RRET=$? diff --git a/clients/R/Tests/survey.R b/clients/R/Tests/survey.R --- a/clients/R/Tests/survey.R +++ b/clients/R/Tests/survey.R @@ -1,4 +1,8 @@ -library(MonetDB.R,quietly=T) +ll <- NULL +if (Sys.getenv("TSTTRGDIR") != "") { + ll <- paste0(Sys.getenv("TSTTRGDIR"),"/rlibdir") +} +library(MonetDB.R,quietly=T,lib.loc=ll) library(sqlsurvey,quietly=T) args <- commandArgs(trailingOnly = TRUE) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list