aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc>2005-04-26 14:23:35 +0000
committerranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc>2005-04-26 14:23:35 +0000
commit431b88f2b47522a7c92510ed44ab0711a3ed8e33 (patch)
treee517810c35f7bfd913a61fdaa3889f3a93a4f43a
parentbf1d3b82134f6a5e108ba6bbbe8eb578b69b9264 (diff)
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
-rw-r--r--DESCRIPTION2
-rw-r--r--R/drfit.R7
-rw-r--r--man/drdata.Rd10
-rw-r--r--man/drfit.Rd4
4 files changed, 14 insertions, 9 deletions
diff --git a/DESCRIPTION b/DESCRIPTION
index 569a2a8..2b3612c 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
Package: drfit
-Version: 0.03-20
+Version: 0.03-21
Date: 2005-03-17
Title: Dose-response data evaluation
Author: Johannes Ranke <jranke@uni-bremen.de>
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",
diff --git a/man/drdata.Rd b/man/drdata.Rd
index ef1d104..de5e625 100644
--- a/man/drdata.Rd
+++ b/man/drdata.Rd
@@ -27,9 +27,11 @@
With this argument, additional conditions for the SQL query can be set,
e.g. "where plate != 710". The default is 1 (in SQL syntax this means TRUE).}
\item{ok}{
- With the default value "'ok'", only data that has been checked and set to "ok"
- in the database is retrieved. Another sensible argument would be "'ok','?'", in
- order to additionally retrieve data which has not yet been checked.}
+ With the default value "'ok','no fit'", only data that has been checked and set to "ok"
+ or "no fit" in the database is retrieved. The argument "no fit" means will result in
+ not using the data for fitting, but it will be plotted.
+ Another sensible argument would be "'ok','no fit','?'", in order to additionally
+ retrieve data which has not yet been checked.}
}
\value{
\item{data}{
@@ -68,7 +70,7 @@
}
\examples{
# Get cytotoxicity data for Tributyltin and zinc pyrithione, tested with IPC-81 cells
-\dontrun{data <- drdata(c("TBT","Zn Pyrithion"))}
+\dontrun{data <- drdata(c("TBT","ZnPT2"))}
}
\author{
Johannes Ranke
diff --git a/man/drfit.Rd b/man/drfit.Rd
index ddcf80b..42bbd07 100644
--- a/man/drfit.Rd
+++ b/man/drfit.Rd
@@ -17,7 +17,9 @@
response values of the test system normalized between 0 and 1 and a column
"dose" with the numeric dose values. For later use of the
\code{\link{drplot}} function, a factor called "dosefactor" also has to be
- present, containing the dose as a factor.
+ present, containing the dose as a factor. If there is a column called "ok"
+ and it is set to "no fit", then the corresponding data point will be excluded
+ from the fitting procedure.
}
\item{startlogEC50}{
Especially for the linearlogis model, a suitable log10 of the EC50 has to be given

Contact - Imprint