Displaying 2 results from an estimated 2 matches for "fixformulaobject".
2004 Mar 09
3
update forgets about offset() (PR#6656)
...df)
test> fit1$call
glm(formula = y ~ offset(x) + z, data = df)
test> fit1u <- update( fit1, ~.)
test> fit1u$call
glm(formula = y ~ z, data = df)
The problem occurs when 'update.formula' calls 'terms.formula(..., simplify=TRUE)' which defines and calls a function 'fixFormulaObject'. The first line of 'fixFormulaObject' attempts to extract the contents of the RHS of the formula via
tmp <- attr(terms(object), "term.labels")
but this omits any offsets. Replacing that line with the following, which I think pulls in everything except the response, *see...
2009 Jul 30
3
update.formula and backticked colons
I just noticed the following in update.formula and I'm wondering if
this behavior is the intention of the developers. Here's an example:
update(`a: b` ~ x, ~ . + y)
Note now that the response has no backticks and is interpreted as a:b
(i.e. ":" is now an operator). This is because in update.formula the
call to terms.formula uses simplify = TRUE. I'm working with data that