Domanda

my system :debian in console: nano /home/tiger/R-2.15.1/etc/Rprofile.site
here is my content:

.First <- function(){    
     cat("\nWelcome at", date(), "\n")
     }

.Last <- function(){
    cat("\nGoodbye at ", date(), "\n")
    }

when i save it ,reopen my R , why there is no
Welcome at Sun Jul 15 07:53:58 2012 in my R?

È stato utile?

Soluzione

Double-check which files are being read. Works here via ~/.Rprofile. Using

edd@max:~$ tail -4 .Rprofile

.First <- function(){
    cat("\nWelcome at", date(), "\n")
}

gets the welcome message out:

edd@max:~$ R -q

Welcome at Sat Jul 14 20:36:57 2012 
R> 
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top