[R] Selective load of .First() function just for Rgui.exe

jgarcia at ija.csic.es jgarcia at ija.csic.es
Fri Feb 12 17:22:50 CET 2010


Hi all,
I have a  .First <- function() {...} in the Rprofile.site file. Through
.First() I'm adding several menus to the GUI to access several functions
I've been developing for own use.

However, I also need to launch R scripts silently in a batch way, and
in this case I get the error message:

"Error in winMenuAdd(menuname, NULL, NULL):
 Menu functions can only be used in the GUI"

Do you know about about a way to selectively read the .First()
function just for Rgui.exe, but not for call to R.exe?

Thanks and best regards,
Javier
---



More information about the R-help mailing list