[R-sig-Fedora] Problem running R from within a script
Tom "spot" Callaway
tcallawa at redhat.com
Tue Nov 25 19:11:57 CET 2008
On Tue, 2008-11-25 at 13:13 -0500, Joshua Kramer wrote:
> Howdy Folks,
>
> I am running R version 2.7.2 (2008-08-25) on CentOS 5.2 - the standard RPM
> distribution.
>
> I am having a curious occurance trying to run a R script from within a
> shell script. Basically, I have a small R script that processes a file.
> It takes two parameters - the input file, and the output file. I then
> have a shell script that runs the R script for each file matching a glob.
>
> R is not picking up the correct parameters *when run from the script*.
> When I run the command line by itself, it runs fine.
>
> The command line is this:
>
> /usr/bin/R CMD BATCH --no-restore --no-save '--args $taxFile $taxFile.taxonomy' batchMakeTax.R batchMakeTax.log
I'm just guessing here, but those ' ' single quotes don't seem to make
sense. Try dropping them (or moving them to just be around '$taxFile
$taxFile.taxonomy').
~spot
More information about the R-SIG-Fedora
mailing list