[Rd] problem with plot.lm?
Benilton Carvalho
bcarvalh at jhsph.edu
Fri Aug 21 23:00:33 CEST 2009
I'm bringing this issue to r-devel as my idea of sending it to r-help
appears to be wrong.
The following is reproducible in R-patched and R-devel (also in older
versions).
An outlier is inserted in group E and the last plot by plot.lm
suggests that the point belongs to D.
It appears to me that:
* (facval, rsp) and
* x$xlevels[[1L]][order(sapply(split(yh,mf[,1]), mean))]
are sorted differently.
set.seed(2)
a <- rnorm(50,0,2)
x <- rep(seq(10, 50, by=10), each=10)
y <- x+a
f <- rep(c("e","a","c","b","d"), rep(10,5))
f <- as.factor(f)
y[1] <- 200
mod1 <- aov(y ~ f)
par(mfrow=c(2,2))
plot(mod1)
My latest attempt was on:
> sessionInfo()
R version 2.10.0 Under development (unstable) (2009-08-20 r49335)
x86_64-unknown-linux-gnu
locale:
[1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C
[3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915
[5] LC_MONETARY=C LC_MESSAGES=en_US.iso885915
[7] LC_PAPER=en_US.iso885915 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
>
thank you,
b
More information about the R-devel
mailing list