Possible Duplicate:
Function to Clear the Console in R
In bash, its like this:
$ clear
And I believe it's CTL-L in the Windows version of R. But how do you clear the R console in Unix-type R Consoles? Do you need to write a special function and what would that look like?
Ctrl+L — Clear the Console. Esc — Interrupt R.
clear() The console. clear() method clears the console if the console allows it. A graphical console, like those running on browsers, will allow it; a console displaying on the terminal, like the one running on Node, will not support it, and will have no effect (and no error).
You can use Ctrl+L keyboard shortcut in Linux to clear the screen. It works in most terminal emulators. If you use Ctrl+L and clear command in GNOME terminal (default in Ubuntu), you'll notice the difference between their impact.
Command+Option+L in R for Mac OS X
Ctrl+L in RStudio for Mac OS X
Since you ask for Ubuntu as well, it's simply Ctrl-L from a standard gnome-terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With