From 6cd60a250597e6cae027e17fbb9dd40ca63f1728 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 11 Oct 2018 18:02:29 +0200 Subject: Version 0.7.2 with fixed checkplate function --- ChangeLog | 2 ++ R/checkexperiment.R | 16 ++++++++-------- R/checkplate.R | 1 + check.log | 9 ++++++++- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11a12e2..a3efbd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * DESCRIPTION: New verson 0.7.2 * Switch to odbc instead of RODBC + * Fix the checkplate function which was not working with this setup, + presumably because of different behaviour of mariadb compared to mysql 2017-07-18 Johannes Ranke diff --git a/R/checkexperiment.R b/R/checkexperiment.R index 7fa1a60..865d678 100644 --- a/R/checkexperiment.R +++ b/R/checkexperiment.R @@ -1,7 +1,7 @@ utils::globalVariables(c("type", "conc", "substance")) -checkexperiment <- function(id, - db = c("ecotox", "cytotox", "enzymes"), +checkexperiment <- function(id, + db = c("ecotox", "cytotox", "enzymes"), endpoint = "%") { db = match.arg(db) @@ -27,13 +27,14 @@ checkexperiment <- function(id, comment <- as.character(commentdata[[1]]) expquery <- paste0("SELECT ", - "experimentator, substance, ", testtype, ", conc, unit,", responsename, ", - type, raw_0, duration, performed, ok ", + "experimentator, substance, ", testtype, ", conc, unit, ", responsename, ", ", + if (db == "ecotox") "type, raw_0, duration, ", + "performed, ok ", "FROM ", db, " ", "WHERE ", exptype, "=", id) if (db == "ecotox") { - expquery <- paste0(expquery, " AND type LIKE '", endpoint, "'") + expquery <- paste0(expquery, " AND type LIKE '", endpoint, "'") } expdata <- dbGetQuery(con, expquery) @@ -61,7 +62,7 @@ checkexperiment <- function(id, } else { # Use raw response for ecotox expdata$response <- expdata$raw_response - + if (nlevels(expdata$type) > 1) { message("There are data for more than one type of raw response in your data.\n", "The types are ", paste(levels(expdata$type), collapse = " and "), ".\n", @@ -168,8 +169,7 @@ checkexperiment <- function(id, lld <- log10(min(subset(drdata,conc!=0)$conc)) lhd <- log10(max(drdata$conc)) - ylab <- if (db == "ecotox") endpoint - else responsename + ylab <- if (db == "ecotox") endpoint else responsename plot(1,type="n", xlim = c(lld - 0.5, lhd + 2), diff --git a/R/checkplate.R b/R/checkplate.R index 1421179..d66e1be 100644 --- a/R/checkplate.R +++ b/R/checkplate.R @@ -1,4 +1,5 @@ checkplate <- function(id, db = c("cytotox", "enzymes")) { + db <- match.arg(db) checkexperiment(id, db = db) } diff --git a/check.log b/check.log index 165a11c..8ccba2d 100644 --- a/check.log +++ b/check.log @@ -1,10 +1,13 @@ * using log directory ‘/home/jranke/git/drfit/drfit.Rcheck’ -* using R version 3.5.1 (2018-07-02) +* using R Under development (unstable) (2018-10-11 r75429) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 +* using option ‘--as-cran’ * checking for file ‘drfit/DESCRIPTION’ ... OK * this is package ‘drfit’ version ‘0.7.2’ * package encoding: UTF-8 +* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers +Maintainer: ‘Johannes Ranke ’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK @@ -13,9 +16,11 @@ * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK +* checking serialization versions ... OK * checking whether package ‘drfit’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK +* checking for future file timestanps ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK @@ -29,6 +34,7 @@ * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK +* checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK @@ -36,6 +42,7 @@ * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK +* checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK -- cgit v1.2.1