Bioequivalence and Bioavailability Forum

Main page Policy/Terms of Use Abbreviations Latest Posts

 Log-in |  Register |  Search

Back to the forum  Query: 2017-11-23 19:11 CET (UTC+1h)

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

posted by yjlee168 Homepage - Kaohsiung, Taiwan, 2017-09-02 05:20  - Posting: # 17761
Views: 495

Hi ElMaestro,

the meaning of 'stdout'? outputs on the console? If yes, you can try

zz<- file("output.txt",open="wt")
sink(zz,split=TRUE)  ### this will send output to the file and on the console simultaneously
sink(zz,split=FALSE)  ### this will send all outputs to the file only, but will not be on the console;default for sink(), same as sink(zz).
sink() ### this will temporarily stop sending output to the file; console output is still on.
sink(zz,split=TRUE) ### re-activate sink() again;
close(zz) ### close the output; use it before q(); otherwise, the output text file may not be complete.

I am not quite sure if I answer your question correctly or not.

All the best,
---Yung-jin Lee
[image]bear v2.8.3:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan
Download link (updated) -> here

Complete thread:

Back to the forum Activity
 Mix view
Bioequivalence and Bioavailability Forum | Admin contact
17,494 Posts in 3,746 Threads, 1,090 registered users;
28 users online (0 registered, 28 guests).

Cave diving is like playing chess
but the king is not made of wood.    Jochen Hasenmayer

BEBAC Ing. Helmut Schütz