[R] Named pipe connections and stdout
Mark Myatt
mark at myatt.demon.co.uk
Mon Nov 26 10:57:29 CET 2001
All,
I am trying to use a named pipe to steer R from an external application.
Following the examples in RNEWS 1:1, I have created a simple listener:
zz <- fifo("TESTFIFO", "r")
repeat
{
a <- readLines(zz)
if(length(a) != 0)
{
e <- try(eval(parse(text = a)))
if (inherits(e, "try-error"))
{
# error handling code here
cat("Error", "\n")
}
}
}
I tested this by steering R from a simple console (e.g. using something
like:
echo "<r-command> > TESTFIFO
This works OK but where has stdout gone?
Mark
--
Mark Myatt
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list