From B.Rowlingson at lancaster.ac.uk  Wed Oct  5 14:25:27 2005
From: B.Rowlingson at lancaster.ac.uk (Barry Rowlingson)
Date: Wed, 05 Oct 2005 13:25:27 +0100
Subject: [Rd] R crashes for large formulas in lm() (PR#8180)
In-Reply-To: <20051005121210.9ECE41DD2B@slim.kubism.ku.dk>
References: <20051005121210.9ECE41DD2B@slim.kubism.ku.dk>
Message-ID: <4343C637.6040908@lancaster.ac.uk>


> set.seed(123)
> x1 <- runif(1000)
> x2 <- runif(1000)
> x3 <- runif(1000)
> x4 <- runif(1000)
> x5 <- runif(1000)
> x6 <- runif(1000)
> x7 <- runif(1000)
> x8 <- runif(1000)
> y <- rnorm(1000)
> fit <- lm(y~(x1*x2*x3*x4*x5*x6*x7*x8)^2)

  For me (with 9 variables) this crashes in model.matrix:

  > f1=y~(x1*x2*x3*x4*x5*x6*x7*x8*x9)^2
  > model.matrix(f1)
  Segmentation fault

  I guess someone with a debug-compiled R can get a bit further...

Baz



[Rd] R crashes for large formulas in lm() (PR#8180)
Barry Rowlingson