aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-05-23 15:24:58 +0000
committerranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-05-23 15:24:58 +0000
commit3b3d6dfc88c4b8b6475147a3afb5258a5fc82fa5 (patch)
tree4aeecbfa8cde4ccde4ab8145e74095e6df73f1d8 /R
parentf381f9a6a8a47b89ec25cd627833a7248da7932b (diff)
First version published on my website.
git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/chemCal@14 5fad18fb-23f0-0310-ab10-e59a3bee62b4
Diffstat (limited to 'R')
-rw-r--r--R/calplot.R12
1 files changed, 6 insertions, 6 deletions
diff --git a/R/calplot.R b/R/calplot.R
index 753d333..0cc6120 100644
--- a/R/calplot.R
+++ b/R/calplot.R
@@ -24,11 +24,10 @@ calplot.lm <- function(object,
if (length(object$weights) > 0) {
stop(paste(
- "\nConfidence and prediction intervals for weighted linear models require",
- "weights for the x values from which the predictions are to be generated.",
- "This is not supported by the internally used predict.lm method.",
- sep = "\n"
- ))
+ "\nConfidence and prediction intervals for weighted linear models require",
+ "weights for the x values from which the predictions are to be generated.",
+ "This is not supported by the internally used predict.lm method.",
+ sep = "\n"))
}
if (alpha <= 0 | alpha >= 1)
@@ -40,8 +39,9 @@ calplot.lm <- function(object,
x <- m$model[[2]]
if (xlim[1] == "auto") xlim[1] <- 0
if (xlim[2] == "auto") xlim[2] <- max(x)
+ xlim <- as.numeric(xlim)
newdata <- list(
- x = seq(from = xlim[1], to = xlim[2], length=250))
+ x = seq(from = xlim[[1]], to = xlim[[2]], length=250))
names(newdata) <- names(m$model)[[2]]
if (is.null(varfunc)) {
varfunc <- if (length(m$weights)) {

Contact - Imprint