Re: [R] Use R in a pipeline as a filter

2007-06-08 Thread Dirk Eddelbuettel
On 7 June 2007 at 14:27, [EMAIL PROTECTED] wrote: | how can I use R in a pipline like this | | $ ./generate-data | R --script-file=Script.R | ./further-analyse-data result.dat The 'r' in our 'littler' package can do that. One example we show on the littler webpage is $ ls -l /boot |

[R] Use R in a pipeline as a filter

2007-06-07 Thread mw-u2
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

Re: [R] Use R in a pipeline as a filter

2007-06-07 Thread Prof Brian Ripley
This is one of the things that 'Rscript' is for: see 'An Introduction to R' (section B.4 in the HTML version, http://cran.r-project.org/doc/manuals/R-intro.html#Scripting-with-R). You haven't even told us your version of R or OS (see the posting guide): you need R = 2.5.0 for this. But your