Welcome to the Genome Toolbox! I am glad you navigated to the blog and hope you find the contents useful and insightful for your genomic needs. If you find any of the entries particularly helpful, be sure to click the +1 button on the bottom of the post and share with your colleagues. Your input is encouraged, so if you have comments or are aware of more efficient tools not included in a post, I would love to hear from you. Enjoy your time browsing through the Toolbox.

Friday, November 15, 2013

How to Clear the Console in R

Sometimes the console gets a bit messy in R and its nice to clear things out to ensure a program is running correctly and without any errors or warnings.  I have found two ways to clear the console.

Keyboard shortcut:
Ctrl+L in Windows
Command+L in Mac

cat(rep("\n",64)) essentially adds a lot of character returns

There are probably a host of other ways to do this programmatically, so please include suggestions in the comments.  For example, I saw cat("\014") as an example when Goggling this, but the code does not seem to work on my PC.

No comments:

Post a Comment