When formula() is applied to the output of model.frame() it ignores the formula in the model.frame's 'terms' attribute:
> d <- data.frame(A=log(1:6), B=LETTERS[rep(1:2,c(2,4))], C=1/(1:6), D=rep(letters[25:26],c(4,2)), Y=1:6) > m0 <- model.frame(data=d, Y ~ A:B) > formula(m0) Y ~ A + B > `attributes<-`(terms(m0), value=NULL) Y ~ A:B This is in part because model.frame()'s output has class "data.frame" instread of c("model.frame","data.frame"), as SV4 did, so there are no methods for model.frames. Is there a reason that model.frame() returns a data.frame with extra attributes but no special class or is it just an oversight? Bill Dunlap TIBCO Software wdunlap tibco.com [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel