At least for me, the problem is not to do with the length of
formula. You have a term in the formula with a very long name, and
there are several places that can go wrong. For example, for the N=20
version I get
model.frame(as.formula(temp2), tdata) -> foo
foo
Error in do.call("data.frame"
The model.frame function has trouble with a certain type of really long
formula. Here is a test:
tname <- paste('var', 1:50, sep='')
tmat <- matrix(rnorm(500), ncol=50, dimnames=list(NULL, tname))
tdata <- data.frame(tmat)
temp1 <- paste( paste(tname, tname, sep='='), collapse=', ')
temp2 <- pas