I would to change the start up/ logon screen that I get when I first open up R or actually Rstudio. What I would like to have is just the '>' prompt and nothing else.
I know I have seen this on the web before but can't remember what the search phrase was.
I should have added that I am using Ubuntu Linux 10.04!
Any suggestions?
Ctrl+L — Clear the Console.
To run an R command, put the cursor on the line of the command and then click the Run button at the top of the file window. Or just press CTRL-Enter.
RStudio has four main panes each in a quadrant of your screen: Source Editor, Console, Workspace Browser (and History), and Plots (and Files, Packages, Help).
Other guys are giving you advice how to stop the messages, I will take it the other way: how to clear the console. You can press Ctrl-L
manually. Of course, it would be nice to do this programmatically and place the appropriate command at the end of your system .RProfile
. I tried the obvious solution:
cat("\014") # or cat("\f")
but this apparently doesn't work. You can do this:
cat(rep("\n", 50))
which will clean your console, but the cursor is at the last line. Or you may try the solution proposed here (I've not tested it though - please report if it works if you try it):
cls <- function() {
require(rcom)
wsh <- comCreateObject("Wscript.Shell")
comInvoke(wsh, "SendKeys", "\014")
invisible(wsh)
}
On linux console, the following could work:
system("clear")
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