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
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
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.