[R] "Pipelining" programs in R

From: Dan Rabosky <dlr32_at_cornell.edu>
Date: Fri 19 May 2006 - 13:50:24 EST

Hello...

I would like to use R for 'pipelining' data among several programs. I'm wondering how I can use R to call another program, feed that program a set of parameters, and retrieve the output.

E.g., I have an executable that, when opened, prompts the user to enter a set of parameters. The program then executes & prompts the user for the name of an output file. I need to run this program on a large batch of parameters, such that it would clearly be desirable to automate the process. Is there a straightforward way to do this? I can't find any online documentation addressing this topic, but perhaps I've not been looking in the right place.

In pseudocode, supposing I have a large array of parameters in R:

For each set of parameters

-Open Program.
-Enter Parameters.
-Cause program to execute (typically done by simply entering " \n
" after manually entering parameters).

-Enter name of output file.
-Close program.

Any advice will be greatly appreciated!

Thanks,
Dan Rabosky

Dan Rabosky
Department of Ecology and Evolutionary Biology 237 Corson Hall
Cornell University
Ithaca, NY14853-2701 USA
web: http://www.birds.cornell.edu/evb/Graduates_Dan.htm



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 May 19 15:06:59 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 19 May 2006 - 22:10:15 EST.

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