Re: [R] Using system to run a stand alone program that requires input in Windows

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Fri 15 Jul 2005 - 04:22:44 EST

Dr Carbon wrote:

> Under Windows I want to run a stand alone program that takes a number
> of commands from the user. I've been running the program from the
> command line using <
>
> C:\Data\> foo.exe < params.txt
>
> where foo is the program is params.txt is a text file with a few lines
> (9) of parameters.
>
> I want to run this from R using system a la:
>
> system("foo.exe", input = "params.txt")
>
> but that doesn't do it. What am I missing?

You misinterpreted "input":

   system("foo.exe < params.txt")

should be sufficient. See also ?shell.

Uwe Ligges

> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> status
> major 2
> minor 1.0
> year 2005
> month 04
> day 18
> language R
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 15 04:24:32 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:42 EST