When R starts in GUI (e.g., /Applications/R.app/Contents/MacOS/R) on my Mac OS X 10.7.5, the startup configuration in .Rprofile works fine. However, when R starts on the terminal (e.g., /Library/Frameworks/R.framework/Resources/bin/R), it does not work at all. What could be the reason for the failure? Thanks, Gang
The only reason that *should* happen is if there's an .Rprofile in the directory you're in when you start R. Where *exactly* is the .Rprofile file you want loaded, what directory are you starting from, and what does R say is the user's home directory? Did you make *any* changes to Rprofile.site, or Renviron? What is the output from Sys.getenv() in gui and cli, and do they differ?> On Sep 18, 2014, at 11:18 AM, Gang Chen <gangchen6 at gmail.com> wrote: > > When R starts in GUI (e.g., /Applications/R.app/Contents/MacOS/R) on > my Mac OS X 10.7.5, the startup configuration in .Rprofile works fine. > However, when R starts on the terminal (e.g., > /Library/Frameworks/R.framework/Resources/bin/R), it does not work at > all. What could be the reason for the failure? > > Thanks, > Gang > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
On 18-09-2014, at 17:18, Gang Chen <gangchen6 at gmail.com> wrote:> When R starts in GUI (e.g.,/Library/Frameworks/R.framework/Resources/bin/R) on > my Mac OS X 10.7.5, the startup configuration in .Rprofile works fine. > However, when R starts on the terminal (e.g., > /Library/Frameworks/R.framework/Resources/bin/R), it does not work at > all. What could be the reason for the failure? >This belongs on the R-SIG-Mac mailing list. 1. Are you running T in Terminal with the command "/Library/Frameworks/R.framework/Resources/bin/R?? You can use just R because /usr/bin is in PATH (or it should be). 2. Are you running R GUI with the command "/Applications/R.app/Contents/MacOS/R?? From Terminal? if so use open -a R. 3. Most importantly: what differences are happening? Differences in PATH environment variable? ?.. I just tried R GUI and R in Terminal and my ~/.Rprofile is being read by both. Berend> Thanks, > Gang > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.