From maechler@stat.math.ethz.ch  Thu Sep 16 07:22:15 1999
From: maechler@stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Thu, 16 Sep 1999 08:22:15 +0200 (MET DST)
Subject: plot ( <aov.obj> ) failed -- easy fix (PR#279)
Message-ID: <199909160622.IAA22004@pubhealth.ku.dk>

>>>>> On Wed, 15 Sep 1999 18:43:01 +0200 (MET DST), maechler@stat.math.ethz.ch (Martin Maechler) said:

    MM> It is already commited for "tomorrow"s snapshot of R-release
    MM> (why on earth has nobody noticed ??)


  >> --- plot.lm.R	1999/08/13 09:36:22	1.4
  >> +++ plot.lm.R	1999/09/15 16:39:45
  >> @@ -17,7 +17,7 @@
  >>      hii <- lm.influence(x)$hat
  >>      s <- sqrt(deviance(x)/df.residual(x))
  >>      if (any(show[2:3])) {
  >> -	ylab23 <- switch(class(x)[1], lm = "Standardized residuals",
  >> +	ylab23 <- switch(class(x)[1], aov = , lm = "Standardized residuals",
  >>  			 glm = "Std. dev. residuals")
  >>  	rs <- r/sqrt(1 - hii)/s
  >>      }

but a much better patch is

--- plot.lm.R	1999/08/13 09:36:22	1.4
+++ plot.lm.R	1999/09/16 06:17:13	1.4.2.2
@@ -17,8 +17,8 @@
     hii <- lm.influence(x)$hat
     s <- sqrt(deviance(x)/df.residual(x))
     if (any(show[2:3])) {
-	ylab23 <- switch(class(x)[1], lm = "Standardized residuals",
-			 glm = "Std. dev. residuals")
+	ylab23 <- if(inherits(x, "glm"))
+	    "Std. dev. residuals" else "Standardized residuals"
 	rs <- r/sqrt(1 - hii)/s
     }
     one.fig <- prod(par("mfcol")) == 1

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


plot ( <aov.obj> ) failed -- easy fix (PR#279)
maechler@stat.math.ethz.ch