[R] R more Unix-like?

Robert Citek rwcitek at alum.calberkeley.org
Thu May 11 04:02:00 CEST 2006


Is there a way to stream data into R so that it can be used in a  
command pipe?

Most Unix commands read data via standard input and read the script  
from the command line.  For example:

   $ seq 1 10 | sed -e 's/^/foo /'
   $ seq 1 10 | awk '{print "foo " $1}'
   $ seq 1 10 | perl -lane 'print "foo $F[0]"'

In contrast, R seems to read the script from standard input, thereby  
preventing streaming data through that file descriptor.  In reading  
through the man page for R and R-intro.html I haven't seen anything  
obvious to change this behaviour.  Is it possible?

Pointers to references would be greatly appreciated.

Regards,
- Robert
http://www.cwelug.org/downloads
Help others get OpenSource software.  Distribute FLOSS
for Windows, Linux, *BSD, and MacOS X with BitTorrent




More information about the R-help mailing list