From 431b88f2b47522a7c92510ed44ab0711a3ed8e33 Mon Sep 17 00:00:00 2001 From: ranke Date: Tue, 26 Apr 2005 14:23:35 +0000 Subject: The drdata and the drfit function can now handle data with "no fit" entries in the "ok" column. They are not used for fitting, but they are plotted. git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/drfit@21 d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc --- R/drfit.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'R/drfit.R') diff --git a/R/drfit.R b/R/drfit.R index 987c324..da5b34d 100644 --- a/R/drfit.R +++ b/R/drfit.R @@ -1,6 +1,6 @@ drdata <- function(substances, experimentator = "%", db = "cytotox", celltype="IPC-81",enzymetype="AChE",whereClause="1", - ok="'ok'") + ok="'ok','no fit'") { library(RODBC) channel <- odbcConnect(db,uid="cytotox",pwd="cytotox",case="tolower") @@ -41,6 +41,7 @@ drfit <- function(data, startlogEC50 = NA, chooseone=TRUE, linearlogis = FALSE, linearlogisWrong = NA, b0 = 2, f0 = 0) { + if(!is.null(data$ok)) data <- subset(data,ok!="no fit") substances <- levels(data$substance) unit <- levels(as.factor(data$unit)) @@ -269,7 +270,7 @@ drplot <- function(drresults, data, dtype = "std", alpha = 0.95, cat("Created File: ",filename,"\n") } if (!postscript && !png) { - x11(width=7,height=7,pointsize=12) + get(getOption("device"))(width=7,height=7,pointsize=12) } plot(0,type="n", @@ -306,7 +307,7 @@ drplot <- function(drresults, data, dtype = "std", alpha = 0.95, cat("Created File: ",filename,"\n") } if (!postscript && !png) { - x11(width=7,height=7,pointsize=12) + get(getOption("device"))(width=7,height=7,pointsize=12) } plot(0,type="n", -- cgit v1.2.1