Skip to content
Prev 252679 / 398498 Next

Can body() return a function's body intact, in order, and as characters ready for editing?

On 11-03-05 8:20 PM, Kingsley G. Morse Jr. wrote:
Yes, that's not what body() returns.  You can get what you want by 
printing the result of body(), e.g.

capture.output(print(body(f)))

However, your use of paste below isn't going to work on multi-line 
functions.

Duncan Murdoch