From 0dbb88867fbcdfbcee73beb8a971b10ab80da3d1 Mon Sep 17 00:00:00 2001 From: ranke Date: Wed, 26 Apr 2006 13:38:32 +0000 Subject: - drplot: Removed the call to get(getOption("device")), since it caused problems when calling drplot from Sweave code chunks as well as in JGR. - drplot: Removed the output with cat, since it may be annoying to receive a message when a plot was requested - Small documentation adaptations and fixes git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/drfit@70 d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc --- R/drplot.R | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'R') diff --git a/R/drplot.R b/R/drplot.R index 8faaa0f..eaae85b 100644 --- a/R/drplot.R +++ b/R/drplot.R @@ -25,12 +25,7 @@ drplot <- function(drresults, data, if (nc > 0) { sdc <- sd(zerodata$response) controlconf <- sdc * qt((1 + alpha)/2, nc - 1) / sqrt(nc) - cat("There are ",nc,"data points with dose 0 (control values)\n") - cat("with a standard deviation of",sdc,"\n") - cat("and a confidence interval of",controlconf,"\n") if (nc < 3) { - cat("\nThere are less than 3 control points, therefore their scatter\n") - cat("will not be displayed\n") ctype = "none" } } else { @@ -82,15 +77,17 @@ drplot <- function(drresults, data, width=500, height=500, pointsize=pointsize) cat("Created File: ",filename,"\n") } - if (!postscript && !png && !pdf) { - get(getOption("device"))(width=7,height=7) - } plot(0,type="n", xlim = xlim, ylim = ylim, xlab = paste("Decadic Logarithm of the dose in ", unit), ylab = "Normalized response") + } else { + # If overlay plot is not requested, ask before showing multiple plots on the screen + if (!postscript && !png && !pdf) { + par(ask=TRUE) + } } # Plot the data either as raw data or as error bars @@ -126,9 +123,6 @@ drplot <- function(drresults, data, width=500, height=500, pointsize=pointsize) cat("Created File: ",filename,"\n") } - if (!postscript && !png && !pdf) { - get(getOption("device"))(width=7,height=7) - } plot(0,type="n", xlim = xlim, -- cgit v1.2.1