Site icon R-bloggers

R: directing output to file on the fly, output flushing

[This article was first published on Statistics Blog » r, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

To start sending all output to a file, do this:

Related to this I recently had to use:

This forces your console to print out any buffered content. Doing this will cost time, but if you are running a very long script and wonder if it is still alive, you might do something like this:

To leave a comment for the author, please follow the link and comment on their blog: Statistics Blog » r.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.