[R-SIG-Mac] .First for R.app called twice?

R. Michael Weylandt michael.weylandt at gmail.com
Wed May 16 19:10:24 CEST 2012


Suppose I have the following very simple ~/.Rprofile

.First <- function(){
    assign("e", exp(1), .GlobalEnv)
    lockBinding("e", .GlobalEnv)
}

If I start R from the terminal, all is fine, but if I use R.app this
throws an error about not being able to change the assigned value of a
locked binding on "e". This makes me think that R.app hits .First()
twice -- is that the intended behavior? [You can demonstrate this with
cat() statements more directly, but I figured I'd show a use case]

I don't have access to another computer right now to confirm, but the
difference between Terminal and R.app seems funny. If it seems to be a
problem with my machine, I'll hunt further.

Thanks,
Michael



More information about the R-SIG-Mac mailing list