From bf1d3b82134f6a5e108ba6bbbe8eb578b69b9264 Mon Sep 17 00:00:00 2001 From: ranke Date: Thu, 17 Mar 2005 17:16:00 +0000 Subject: 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 --- DESCRIPTION | 4 ++-- R/drfit.R | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b5fed66..569a2a8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: drfit -Version: 0.03-19 -Date: 2005-03-14 +Version: 0.03-20 +Date: 2005-03-17 Title: Dose-response data evaluation Author: Johannes Ranke Maintainer: Johannes Ranke 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") -- cgit v1.2.1