Skip to content
Prev 8256 / 15076 Next

R.app cannot see tar but R (console) can

On 01-08-2011, at 06:15, <Ross.Darnell at csiro.au> <Ross.Darnell at csiro.au> wrote:

            
1. You should have done system("tar"). Now R is looking for an object tar which is empty.

2. GUI applications in Mac OS X don't inherit/receive  the environment used in Terminal.

You can check this in R.app with Sys.getenv("PATH").
You could use Sys.setenv(PATH="...") in R.app to set PATH for that session.

If you want GUI applications to always receive certain environment variables then  see

http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x
http://developer.apple.com/library/mac/#qa/qa1067/_index.html
http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html

If you would like to set environment variables for GUI applications in a "nice" way (would also work for Emacs I think) you can use RCenvironment which provides a preference pane for setting environment variables for GUI applications. See

http://www.rubicode.com/Software/RCEnvironment/

best

Berend