[R] Using a console application from within R

From: Jonathan Weeks <weeksjp_at_colorado.edu>
Date: Wed 01 Feb 2006 - 14:40:35 EST


I would like to open a console application from within R and then send input to the newly opened console. I can use the following to open the application ...

setwd(path)
system(paste(path,"icl.exe",sep=""))

This allows me to type in what want, but I would like to do something like this

setwd(path)
system(paste(path,"icl.exe",sep=""),input=c("icl sim.tcl", "exit"),wait=TRUE)

If I include input as part of the system function the application opens and then closes immediately without processing the input.

Any assistance that you can offer would be greatly appreciated.

Jonathan Weeks
Doctoral Student
School of Education
University of Colorado, Boulder
jonathan.weeks@colorado.edu
303-517-9666



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 Wed Feb 01 14:51:34 2006

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