Skip to content

Output to screen and file at the same time

4 messages · Gabor Grothendieck, Michael Knudsen, Greg Snow

#
Hello!

Using the sink function, output from R may be written to a file
instead of the screen. I would really like to write my output to a
file while running an R script and at the same time view the output
"live" on my screen. Is there are way to do that?

Thanks,
Michael
#
See the split argument in ?sink
On Thu, Aug 13, 2009 at 9:01 AM, Michael Knudsen<micknudsen at gmail.com> wrote:
#
On Thu, Aug 13, 2009 at 3:07 PM, Gabor
Grothendieck<ggrothendieck at gmail.com> wrote:

            
Thanks! I actually did check the manual for sink (it's true!) but
somehow I managed to overlook the split argument.
#
You may also want to look at ?TeachingDemos::txtStart as an alternative to sink, one advantage is that the commands as well as the output can be included.  With a little more work you can also include graphical output into a transcript file.

Hope this helps,