[R] Pipe

Joe Stuart joe.stuart at gmail.com
Tue May 25 20:07:35 CEST 2010

I'm trying to use the pipe function to read data from another process
on my server.

Here is the code I have tried.

con <- pipe("/var/matlab/scripts/stream.pl")
while(con_read <- readLines(con)) {

Problem is that the data from the perl script just keeps appending to
con_read and it never gets to the print function. Which makes sense,
but I would like to be able to perform calculations on con_read, while
the script continues to read from the perl script.

Any help is appreciated.


More information about the R-help mailing list