2011
04.13

While R can be used in batch mode:

R --no-save --no-restore --quiet < myRprog.r > myRprog.log 2>&1

Much more fancy things can be done by means of littler. Littler (pronounced ‘little R’ and written ‘r’) provides hash-bang (i.e. script starting with #!/foo/bar) capability for GNU R, as well as simple command-line and piping use. For all the example take a look at http://dirk.eddelbuettel.com/code/littler.html.

This is how I use it mostly:

# cat test.R | r
[1]  1  2  3  4  5  6  7  8  9 10

or

# echo "print(1:10)" | r
[1]  1  2  3  4  5  6  7  8  9 10

No Comment.

Add Your Comment