process_stream.R

 f <- file("stdin")
 open(f)
 while(length(line <- readLines(f,n=1)) > 0) {
   write(line, stderr())
   # do any other process
 }
RavenPack/r-api documentation built on July 30, 2022, 9:56 p.m.