Skip to content

capture.output on S4 slot

1 message · Thomas Lumley

#
On Fri, Jul 18, 2014 at 4:00 PM, Dario Strbenac
<dstr7320 at uni.sydney.edu.au> wrote:
Dario,

When you use the constructor, the environment of the function is the
environment inside the constructor; when you use new() it is
R_GlobalEnv

The way functions print is that they print their environment when it
isn't something special like R_GlobalEnv. Since capture.output
captures the printed output, that's what it sees.

The function isn't split up; the printed output is.

   -thomas