[R] Can R read data from stdin?

Tony Plate tplate at blackmesacapital.com
Fri Jul 9 22:34:51 CEST 2004

The easiest way would probably be to do the hack of creating a temporary 
file to hold stdin, then call R to process that file.  That would be easy 
to do in a shell script.

If this really won't suffice, this older message might lead to something 

>Rd] R scripting patches for R-1.8.0
>Neil McKay mckay at repsac.gmr.com
>Thu Oct 16 20:30:20 MEST 2003
>Previous message: [Rd] data() misbehaving inside a function
>Next message: [Rd] R scripting patches for R-1.8.0
>Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>I've updated my scripting patches to R-1.8.0. These patches
>allow you to write shell scripts in R (at least on *nix systems)
>by putting
>#!/path/to/R.bin --script
>on the first line of the script file. If you're interested
>in the patches, e-mail me at
>         mckay at gmr.com
>Neil D. McKay, Mail Code 480-106-359    Phone: (586)986-1470 (GM:8-226-1470)
>Manufacturing Systems Research Lab      FAX:   (586)986-0574 (GM:8-226-0574)
>GM Research & Development Center        Internet e-mail: mckay at gmr.com
>30500 Mound Road
>Warren, Mich. 48090

At Friday 02:17 PM 7/9/2004, Hayashi Soichi - shayas wrote:
>Is there anyway I can write a script which feed input datasource from stdin
>and let R process it (maybe frequency report) then output the report to
>I can't seem to find much info on documentation or FAQ on this topic.
>Soichi Hayashi
>The information contained in this communication is
>confidential, is intended only for the use of the recipient
>named above, and may be legally privileged.
>If the reader of this message is not the intended
>recipient, you are hereby notified that any dissemination,
>distribution, or copying of this communication is strictly
>If you have received this communication in error,
>please re-send this communication to the sender and
>delete the original message or any copy of it from your
>computer system. Thank You.
>         [[alternative HTML version deleted]]
>R-help at stat.math.ethz.ch mailing list
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list