aboutsummaryrefslogtreecommitdiff
path: root/R/drplot.R
diff options
context:
space:
mode:
authorranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc>2006-04-26 13:38:32 +0000
committerranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc>2006-04-26 13:38:32 +0000
commit0dbb88867fbcdfbcee73beb8a971b10ab80da3d1 (patch)
tree861c1626b1779c7070459079a207dfcc7bf58157 /R/drplot.R
parentd6f9beafdb3cde38d65d425919e7a04f7f0aeb94 (diff)
- 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
Diffstat (limited to 'R/drplot.R')
-rw-r--r--R/drplot.R16
1 files changed, 5 insertions, 11 deletions
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,

Contact - Imprint