Which function can I use to clear the console in R and RStudio
How we can use clear in r ?
The shortest and the quickest way to clear the global environment in R is by using shortcut keys from the keyboards. Simply hit Ctrl+L on the keyboard and you will see that everything written in the console will be erased and the console will be cleared.
Description Windows & Linux Mac Clear console Ctrl+L Ctrl+L
cat("") is the code to send CTRL+L to the console and therefore will clear the screen.
You can also type cat("")
You can use Ctrl+L — Clear the Console.