[R-SIG-Mac] how to run my R code in Mac OS X 10.5 Leopard?

Ken Beath kjbeath at kagi.com
Sat Dec 29 23:09:30 CET 2007

On 30/12/2007, at 8:33 AM, LUZhiping wrote:

> Hi,
> I have a question in running R 2.4.1 in the Mac OS X 10.5 Leopard.
> I write all my R code without using any packages in R. When I run it  
> in Windows system, it runs smoothly and correctly.
> Then I try to run the same code in Mac OS X 10.5 Leopard. I just  
> copy the script file on the desktop of the Mac OS X. I find  I can  
> open the file directly as a text file.
> To run R in Mac OS X, I type "R" in the terminal window of Unix, but  
> I can not open the script file as I've done in windows. So I copy  
> all the content of my code, and I paste it in the Unix window, but  
> there are always some errors, for example, error for the variable in  
> loops.
> I can not understand why. Though I read some related help file, it  
> seems to me still not quite clear.

Do you mean the source command doesn't work? This requires a  
different  file specification than Windows. On my system to source a  
file on the desktop it is source('/Users/kjbeath/Desktop/TestR.R')

If your looking for a GUI based R similar to Windows, then don't run  
the unix version. The installer should have put an application R in  
the Applications folder. Double click on it.


More information about the R-SIG-Mac mailing list