[R] Updating a formula w a portion of another formula
dalmiral at umich.edu
Wed Dec 29 23:54:33 CET 2004
Suppose I have
oldfmla <- y ~ x
I would like to update it to y ~ x + z which I know I can get using
newfmla <- update(oldfmla, ~ . + z)
However, what if I have
fmlatmp <- ~ z
Can I combine oldfmla and fmlatmp to get y ~ x + z some how?
newfmla <- update(oldfmla, ~ . + fmlatmp)
will not work.
Thanks in advance,
More information about the R-help