[R-SIG-Mac] system() from R.app

nicola sartori sartori at unive.it
Thu Nov 30 09:58:30 CET 2006


Dear all,

I have a question on the use of system(command) from R.app:
if I try, for instance, to do:

system("latex foo.tex")

I get the following output in the console:

/bin/sh: line 1: latex: command not found

While if I do the same thing running R from the terminal (or xterm  
under X11) it works just fine.
I guess the reason is that, when in the terminal, the path is set by  
my shell init file (which, incidentally, is bash) while this doesn't  
happen when in R.app.
By the way, running latex is not a big issue: I can get the right  
path from options(), but for other commands the problem will still be  
there

Is there a workaround for this?

Thanks in advance for any help.

Best,
Nicola



More information about the R-SIG-Mac mailing list