diff options
author | ranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc> | 2005-09-16 15:21:32 +0000 |
---|---|---|
committer | ranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc> | 2005-09-16 15:21:32 +0000 |
commit | 70b8298f02a240de7b97a8336035f825828a8110 (patch) | |
tree | 087f31cb5fe068772dea040f130a3bc7f1fe47c2 /R | |
parent | 318518e17bace1b7dc0a4526af267edd88feb447 (diff) |
Added support for the UFT ecotox database on eckehaat.
git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/drfit@36 d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc
Diffstat (limited to 'R')
-rw-r--r-- | R/drfit.R | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -1,5 +1,6 @@ drdata <- function(substances, experimentator = "%", db = "cytotox", - celltype="IPC-81",enzymetype="AChE",whereClause="1", + celltype="IPC-81",enzymetype="AChE", + organism="Vibrio fischeri",endpoint="Luminescence",whereClause="1", ok="'ok','no fit'") { library(RODBC) @@ -10,18 +11,25 @@ drdata <- function(substances, experimentator = "%", db = "cytotox", testtype <- "celltype" type <- celltype } else { - responsetype <- "activity" - testtype <- "enzyme" - type <- enzymetype + if (db == "enzymes") { + responsetype <- "activity" + testtype <- "enzyme" + type <- enzymetype + } else { + responsetype <- "response" + testtype <- "organism" + type <- organism + } } query <- paste("SELECT conc,",responsetype,",unit,experimentator,substance,",testtype, - ",plate,ok FROM ", db, " WHERE substance IN ('", + ",ok FROM ", db, " WHERE substance IN ('", slist,"') AND experimentator LIKE '", experimentator,"' AND ",testtype," LIKE '", type,"' AND ", whereClause," AND ok in (", ok,")",sep="") + if (db == "ecotox") query <- paste(query," AND type LIKE '",endpoint,"'",sep="") data <- sqlQuery(channel,query) odbcClose(channel) names(data)[[1]] <- "dose" |