diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2017-06-09 15:39:15 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2017-06-09 15:39:15 +0200 |
commit | 9d855e54e6682f7beb4253d7f95b86648be39e86 (patch) | |
tree | 2b014f6efc9be01134cfeb71f1ad48c5a84dde9d | |
parent | c1a1e8c95ca28904e74bbd4b4afc8fe19a925ebc (diff) |
Return also the plate/experiment number in drdata
-rw-r--r-- | R/drdata.R | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -7,23 +7,27 @@ drdata <- function(substances, experimentator = "%", db = "cytotox", channel <- RODBC::odbcConnect(db,uid="cytotox",pwd="cytotox",case="tolower") slist <- paste(substances,collapse="','") if (db == "cytotox") { + experimenttype <- "plate" responsetype <- "viability" testtype <- "celltype" type <- celltype } else { if (db == "enzymes") { + experimenttype <- "plate" responsetype <- "activity" testtype <- "enzyme" type <- enzymetype } else { + experimenttype <- "experiment" responsetype <- "response" testtype <- "organism" type <- organism } } - query <- paste("SELECT conc,",responsetype,",unit,experimentator,substance,",testtype, - ",ok FROM ", db, " WHERE substance IN ('", + query <- paste("SELECT conc,",responsetype,", unit, experimentator, ", + experimenttype, ", substance, ", testtype, + ", ok FROM ", db, " WHERE substance IN ('", slist,"') AND experimentator LIKE '", experimentator,"' AND ",testtype," LIKE '", type,"' AND ", |