Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in R , how to get the output to a file as well as on console at the same time?

Tags:

r

I want only the output not the commands, and I want to see the output on the console at the same time.

I tried sink and capture.output , but tried to work through the examples but I can accomplish only one of the task i.e. either to console or to a file.

I am new to R, and was thinking whether there is a function that can help me see the output on the console and save it to a text file as well?

like image 468
Poptimist Avatar asked Jan 13 '23 03:01

Poptimist


1 Answers

Do sink(file="file.txt", split=TRUE).

like image 97
Thomas Avatar answered Jan 19 '23 10:01

Thomas