Skip to content
Prev 295967 / 398503 Next

trouble automating formula edits when log or * are present; update trouble

I should have added:

If the formula is just assigned to a name, quote() and
eval(parse(...)) are not needed:

fm1 <-  y ~ x1  ## a formula
w <- gsub( "x1","log(x1)", deparse(fm1))
fm2 <- formula(w)

This is probably the btter way to do it.

-- Bert
On Tue, May 29, 2012 at 10:01 AM, Bert Gunter <bgunter at gene.com> wrote: