Bioequivalence and Bioavailability Forum 07:17 CET

Main page Policy/Terms of Use Abbreviations Latest Posts

 Log in |  Register |  Search

Beyond sink() - capturing messages to file and stdout [R for BE/BA]

posted by ElMaestro - Denmark, 2017-09-01 23:23  - Posting: # 17760
Views: 2,740

Hi all,

I would like to capture all messages from R (optionally all R input and output) to a file while at the same time having them on stdout as usual.
The sink() function can do either, but apparently (??) not both simultaneously which is what I'd like to use. I have no idea where to start, actually. Note: This involves shelling R under windows so stdout is stdout whether or not it is captured via a pipe into a GUI.
Alternatively, if there were a method assiciated with q() or quit() which would upon termination save all stdout info (messages+input+output; what you see on a console when you interact in e.g. R GUI or R Studio) to a txt-file post hoc then that would be equally good.

Tried google and TFM :PCchaos: Any idea how to do this?

Many thanks and a good weekend to all.

if (3) 4

Best regards,
ElMaestro

"(...) targeted cancer therapies will benefit fewer than 2 percent of the cancer patients they’re aimed at. That reality is often lost on consumers, who are being fed a steady diet of winning anecdotes about miracle cures." New York Times (ed.), June 9, 2018.

Complete thread:

Activity
 Mix view
Bioequivalence and Bioavailability Forum |  Admin contact
18,882 posts in 4,026 threads, 1,271 registered users;
online 24 (0 registered, 24 guests [including 23 identified bots]).

Some scientists claim that hydrogen, because it is so plentiful,
is the basic building block of the universe.
I dispute that. I say there is more stupidity than hydrogen,
and that is the basic building block of the universe.    Frank Zappa

The BIOEQUIVALENCE / BIOAVAILABILITY FORUM is hosted by
BEBAC Ing. Helmut Schütz
HTML5 RSS Feed