Re: [R] R more Unix-like?

From: Steve Miller <>
Date: Thu 11 May 2006 - 20:28:47 EST

You can use the pipe command to read data:  

msci <- read.table(pipe("python steve/python/"),sep=",",header=T,  

I use this metaphor quite a bit for loading data.  

Steve Miller    

-----Original Message-----
[] On Behalf Of Robert Citek Sent: Wednesday, May 10, 2006 9:02 PM
Subject: [R] R more Unix-like?    

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.  


Help others get OpenSource software. Distribute FLOSS

for Windows, Linux, *BSD, and MacOS X with BitTorrent mailing list

PLEASE do read the posting guide!

        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide! Received on Thu May 11 21:11:19 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 11 May 2006 - 22:10:05 EST.

Mailing list information is available at Please read the posting guide before posting to the list.