Re: [R] Pipelining programs in R

2006-05-19 Thread Prof Brian Ripley
You can use system() or pipe() and friends. This is covered in Section 5.1 of `Writing R Extensions'. Perhaps the simplest way is to something like tmp - tempfile() zz - file(tmp, w) # write the input script to zz, e.g. via cat close(zz) res - system(paste(myprog , tmp), intern = TRUE) and

Re: [R] Pipelining programs in R

2006-05-19 Thread Jan T. Kim
On Thu, May 18, 2006 at 11:50:24PM -0400, Dan Rabosky wrote: 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

[R] Pipelining programs in R

2006-05-18 Thread Dan Rabosky
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.