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
Programmatically:
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