I'm currently writing a .Rprofile
, and I can't seem to get rid of specific parts of the startup messages in the console.
First of all, I would like to either suppress or skip the version info at the start of a new R session.
R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Another thread showed how to suppress the message when starting R from the console, but is it also possible when loading a project inside RStudio? Three years ago someone said it was on the devs to-do-list.
I tried a different approach by beginning my .Rprofile
with cat("\014")
(as shown here), but this somehow clears the console including messages that are printed afterwards.
Here's the relevant code:
cat("\014")
# A fun welcome message
message("Hi, welcome to your Data Analysis Project")
if(interactive())
try(fortunes::fortune(), silent = TRUE)
With this, I end up with a completely empty console at startup.
Ultimately, I would like to end up with this console at startup:
Hi, welcome to your Data Analysis Project
Uwe Ligges: I just told nonsense, stepclass() does not make sense with
randomForest(), obviously ... (wonder why nobody shouted?).
Douglas Bates: Oh, we're just so used to you talking nonsense that we don't
bother to point it out any more :-)
-- Uwe Ligges and Douglas Bates
R-help (July 2005)
>