From h.wickham at gmail.com  Fri Jul  7 14:08:42 2006
From: h.wickham at gmail.com (hadley wickham)
Date: Fri, 7 Jul 2006 13:08:42 +0100
Subject: [Rd] Modifying parsed code
Message-ID: <f8e6ff050607070508h7fe3807fu739763f80a472be0@mail.gmail.com>

I would like to take this:

.img(plot(1:10), filename="a")

and produce

plot(1:10)

ie. whenever .img is used, I want to take the first argument and throw
away everything else.

(I am trying to produce a Sweave like environment in which I can apply
certain functions, but not have them displayed in the output)

I think I should be able to do it using substitute, but I don't know
how to operate on language objects.  Any hints would be appreciated.

Thanks,

Hadley



[Rd] Modifying parsed code
hadley wickham