aov-related segfault (PR#382)
Prof Brian Ripley
ripley@stats.ox.ac.uk
Wed, 22 Dec 1999 11:42:53 +0000 (GMT)
On Mon, 20 Dec 1999 pd@butterfly.kubism.ku.dk wrote:
> This crashes the development version, but apparently also earlier versions
> (a typo of course, but still shouldn't happen)
>
> response<-rnorm(60)
> dag<-gl(3,2,60)
> rep<-gl(2,1,60)
> person<-gl(10,6,60)
> aov(response~dag+Error(person/dag/response)) # error from model.matrix.default
> gc() # *poof*...
Progress report!
1) This is nothing specific to aov. It can be repoduced by
response <- rnorm(60)
dag <- gl(3,2,60)
model.matrix(formula = response ~ dag/response)
2) The crash occurs because a 60x3 (rather than 60x6) matrix is allocated,
so lots of writing outside the matrix occurs.
3) model.matrix(~ dag + response:dag) works, but has a slightly different
terms structure.
4) S generates a 60x5 matrix, which looks wrong to me.
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._