[R-SIG-Mac] R-SIG-Mac] Rscript on OSX

Julin Maloof jnmaloof at ucdavis.edu
Fri Jan 11 17:23:16 CET 2008


Apologies if this is too simplistic an answer for what you need to do, but you could remove the #! line and run using 

R CMD BATCH file.R

where file.R is your script file with the shebang line removed.

help("BATCH") in R will give the details

--Julin

> Message: 1
> Date: Thu, 10 Jan 2008 10:09:06 +0100
> From: "Ido M. Tamir" <tamir at imp.univie.ac.at>
> Subject: [R-SIG-Mac] Rscript on OSX
> To: r-sig-mac at stat.math.ethz.ch
> Message-ID: <200801101009.06228.tamir at imp.univie.ac.at>
> Content-Type: text/plain;  charset="iso-8859-1"
> 
> Hi,
> 
> I directed somebody to install R (2.6.1) on his OSX computer,
> following instructions from http://cran.r-project.org/bin/macosx.
> She used the provided binary image.
> She can run R from the console.
> 
> The problem is that Rscript is not in the path (only minor, because ln -s is 
> hopefully doable). 
> But the script failed when I tried to put a hardcoded path to Rscript into the 
> shebang line. And when I try to invoke it directly:
> 
>> -bash: ./Rscript: cannot execute binary file
> 
> On linux this works:
>> Rscript
> Usage: /path/to/Rscript [--options] [-e expr] file [args]
> 
> --options accepted are
> ....
> 
> 
> I would like to send her some Rscripts, but how can we make them
> run on her system?
> 
> 
> thank you very much,
> ido
> 

-- 
Julin Maloof
Assistant Professor
Section of Plant Biology
University of California, Davis
1 Shields Ave
Davis, CA, 95616

voice: (530) 752-8077
fax:   (530) 752-5410



More information about the R-SIG-Mac mailing list