[R-SIG-Mac] Mac Automator and Rscript

Greg Minshall minshall at umich.edu
Thu Feb 21 18:28:20 CET 2013


John,

what does "which Rscript" say?  what about "which R"?  if the former
says "/usr/bin/Rscript", and the latter "/sw/bin/R" (or maybe something
like "/usr/local/bin/R"), then you are running the wrong Rscript.

the *specific* reason for the error message is that Rscript is starting
up R, and R is looking for, and failing to find, the package Defaults.
(possibly you have code in your ~/.Rprofile that attempts to use
Defaults.)

hope that helps.  (in the case of /sw/bin/R, i'm not sure why Fink isn't
installing Rscript.)

cheers, Greg Minshall
----
> I put the following line in Mac Automator in a Run Shell Script
> (shell: /bin/bash)
>     "Rscript --vanilla ~/Dropbox/Foo.R"

> and get this error: Run Shell Script Failed −1 error; Loading required
> package Defaults

> I put that same line in a terminal and it runs perfectly fine.  Ditto
> for running the R file in Rstudio.



More information about the R-SIG-Mac mailing list