From ripley@stats.ox.ac.uk  Wed Dec 22 11:42:53 1999
From: ripley@stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 22 Dec 1999 11:42:53 +0000 (GMT)
Subject: aov-related segfault (PR#382)
In-Reply-To: <199912202244.XAA25259@pubhealth.ku.dk>
Message-ID: <Pine.GSO.4.05.9912221127150.29538-100000@toucan.stats>

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


aov-related segfault (PR#382)
Prof Brian Ripley