aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc>2005-03-17 17:16:00 +0000
committerranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc>2005-03-17 17:16:00 +0000
commitbf1d3b82134f6a5e108ba6bbbe8eb578b69b9264 (patch)
tree71b2ee0b7b497350363641cc87b6b8e960181029 /R
parent6d0fa52837e7f2220846203b07e2dbc3d6846253 (diff)
The filename generation from substance names in drplot was changed. Now,
parentheses () are not substituted any more. Only whitespace is substituted by "_". git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/drfit@20 d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc
Diffstat (limited to 'R')
-rw-r--r--R/drfit.R9
1 files changed, 5 insertions, 4 deletions
diff --git a/R/drfit.R b/R/drfit.R
index bc0bddd..987c324 100644
--- a/R/drfit.R
+++ b/R/drfit.R
@@ -200,8 +200,8 @@ drfit <- function(data, startlogEC50 = NA, chooseone=TRUE,
f[[ri]] <- NA
}
}
- results <- data.frame(rsubstance,rn, rlhd, mtype, logEC50, stderrlogEC50, unit, sigma)
- names(results) <- c("Substance","n", "lhd","mtype","logEC50","std","unit","sigma")
+ results <- data.frame(rsubstance, rn, rlld, rlhd, mtype, logEC50, stderrlogEC50, unit, sigma)
+ names(results) <- c("Substance","n","lld","lhd","mtype","logEC50","std","unit","sigma")
if (lognorm || logis) {
results$slope <- slope
}
@@ -284,6 +284,7 @@ drplot <- function(drresults, data, dtype = "std", alpha = 0.95,
splitted <- split(data,data$substance)
n <- 0
if (bw) colors <- rep("black",length(dsubstances))
+ # Loop over the substances in the data
for (i in dsubstances) {
n <- n + 1
tmp <- splitted[[i]]
@@ -293,13 +294,13 @@ drplot <- function(drresults, data, dtype = "std", alpha = 0.95,
if (!overlay)
{
if (postscript) {
- filename = paste(path,fileprefix,sub(" ","_",gsub("([\(\) ])", "", i)),".eps",sep="")
+ filename = paste(path,fileprefix,sub(" ","_",i),".eps",sep="")
postscript(file=filename,
paper="special",width=7,height=7,horizontal=FALSE,pointsize=12)
cat("Created File: ",filename,"\n")
}
if (png) {
- filename = paste(path,fileprefix,sub(" ","_",gsub("([\(\) ])", "", i)),".png",sep="")
+ filename = paste(path,fileprefix,sub(" ","_",i),".png",sep="")
png(filename=filename,
width=500, height=500,pointsize=12)
cat("Created File: ",filename,"\n")

Contact - Imprint