From edd at debian.org  Sun Jan 11 21:50:25 2009
From: edd at debian.org (Dirk Eddelbuettel)
Date: Sun, 11 Jan 2009 14:50:25 -0600
Subject: [Rd] R as a scripting engine
In-Reply-To: <alpine.OSX.1.00.0901111151050.16921@tystie.local>
References: <alpine.OSX.1.00.0901111151050.16921@tystie.local>
Message-ID: <18794.23441.997750.621046@ron.nulle.part>


On 11 January 2009 at 20:18, Prof Brian Ripley wrote:
| Those of you tracking R development will have noticed that we are 
| moving towards using R as a scripting engine.
[...]
| Reasons:
| 
| - it is platform-independent and needs no other tools installed.
[...]
| - it is fast.
[...]

Indeed.  I really like working with r scripts. 

And littler by Horner and Eddelbuettel is faster than Rscript -- see eg the
scripts tests/timing.sh and tests/timing2.sh in the SVN archive / littler
tarballs (and the results below for illustration).   

We should still appreciate it you could finally acknowledge existence of
littler it in the R / Rscript documentation.   You are not doing users any
service by pretending it doesn't exist.  

That said, we are not (yet ?) building r for Windows, and I appreciate that
Rscript is available there.  Maintenance and use of R will be easier with a
consistent set of tools.  This is a good move.

Dirk


edd at ron:~/svn/littler/tests> ./timing.sh

 --- GNU bc doing the addition 10 times
real    0m0.028s
user    0m0.004s
sys     0m0.012s

 --- our r doing the addition 10 times
real    0m0.400s
user    0m0.308s
sys     0m0.052s

 --- GNU R's Rscript doing the addition 10 times
real    0m2.077s
user    0m1.832s
sys     0m0.204s

 --- GNU R doing the addition 10 times
real    0m3.974s
user    0m3.728s
sys     0m0.228s
edd at ron:~/svn/littler/tests> ./timing2.sh

 --- our r calling summary() 20 times
real    0m3.261s
user    0m2.976s
sys     0m0.240s

 --- GNU R's Rscript calling summary() 20 times
real    0m4.164s
user    0m3.624s
sys     0m0.548s

 --- GNU R calling summary() 20 times
real    0m8.087s
user    0m7.552s
sys     0m0.492s
edd at ron:~/svn/littler/tests>


-- 
Three out of two people have difficulties with fractions.



[Rd] R as a scripting engine
Dirk Eddelbuettel