[R] Problem calling R from within perl script on Windows

Berend Hasselman bhh at xs4all.nl
Sat Jun 19 10:36:13 CEST 2010



Barry Hall wrote:
> 
> I need to call R from within a Perl script.  I do so using a system call
> like this:
> @args = ('R --vanilla --quiet --file=Rblock'); 
> system(@args) == 0 or die "system @args failed: $!";
> 

Try this

@args = ('R', '--vanilla --quiet --file=Rblock'); 

i.e. make @args consist of two items: the first is the command/program you
want to run and the second consists of  the command line arguments you want
to pass to the program.

/Berend
-- 
View this message in context: http://r.789695.n4.nabble.com/Problem-calling-R-from-within-perl-script-on-Windows-tp2260646p2261032.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list