Skip to content

Doubt about aov and lm function... bug?

1 message · William Dunlap

#
I'm also suspicious of code using parse to construct
expressions.  However this problem arose because the
terms class is a subclass of the formula class and
AlgDesign defines a model.matrix method for the formula
class but not for the terms class.  Hence
  model.matrix(terms(...))
invokes model.matrix.formula, which causes the problem
because AlgDesign::model.matrix.formula isn't general enough to
handle a terms object.

If AlgDesign had a model.matrix.terms function that
called model.matrix.default or was a copy of
model.matrix.default then the problem would go away.

Bill Dunlap
TIBCO Software Inc - Spotfire Division
wdunlap tibco.com