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

From: Berend Hasselman <bhh_at_xs4all.nl>
Date: Sat, 19 Jun 2010 01:36:13 -0700 (PDT)

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.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 19 Jun 2010 - 08:39:11 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 19 Jun 2010 - 09:30:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive