diff options
| author | Johannes Ranke <jranke@uni-bremen.de> | 2018-10-11 18:02:29 +0200 | 
|---|---|---|
| committer | Johannes Ranke <jranke@uni-bremen.de> | 2018-10-11 18:02:29 +0200 | 
| commit | 6cd60a250597e6cae027e17fbb9dd40ca63f1728 (patch) | |
| tree | 5d57aa0e1cae74bb08a3e2fb55b1ce1bf7c81278 /R | |
| parent | 35e779147a3d22662638791de343557dcbf6ebaa (diff) | |
Version 0.7.2v0.7.2
with fixed checkplate function
Diffstat (limited to 'R')
| -rw-r--r-- | R/checkexperiment.R | 16 | ||||
| -rw-r--r-- | R/checkplate.R | 1 | 
2 files changed, 9 insertions, 8 deletions
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)  }  | 
