[R] Use R in a pipeline as a filter

mw-u2 at gmx.de mw-u2 at gmx.de
Thu Jun 7 14:27:29 CEST 2007


Hi,

how can I use R in a pipline like this

 $ ./generate-data | R --script-file=Script.R | ./further-analyse-data > result.dat

Assume a column based output of ./generate-data, e.g. something like:
1 1 1
2 4 8
3 9 27
4 16 64

The R commands that process the data should come from Script.R and should print to stdout (Script.R could for example calculate the square of every entry or calculate the mean of the columns, ...)

The output should be printed to stdout, such that further-analyse-data can use the output.

Can some R expert code that for me please? I would be very happy. I am also happy about information how to do that myself although I dont think I know enough to do that myself.

Thank you for your consideration,

Micha
-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail



More information about the R-help mailing list