From 9d855e54e6682f7beb4253d7f95b86648be39e86 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 9 Jun 2017 15:39:15 +0200 Subject: Return also the plate/experiment number in drdata --- R/drdata.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/R/drdata.R b/R/drdata.R index dc741a6..b7e4761 100644 --- a/R/drdata.R +++ b/R/drdata.R @@ -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 ", -- cgit v1.2.1