[R] R functionality
Prof Brian Ripley
Prof Brian Ripley <ripley@stats.ox.ac.uk>
Mon, 30 Nov 1998 18:29:39 +0000 (GMT)
> Date: Mon, 30 Nov 1998 12:07:10 -0500
> From: Paul Gilbert <pgilbert@bank-banque-canada.ca>
> To: Ed Kademan <kademan@phz.com>
>
> >Is there anything R can do that Splus can't?
>
> Problems which require lots of looping and cannot be re-coded as vector/matrix
> operations are theoretically possible but practically infeasible in S, unless
> they are coded in C or Fortran and called from S. These problems seem to run
> fine in R.
Some but not all. Last night I was trying to run my survival examples
in R on Windows, including a large loop or alternatively a vectorized
version using many 4000x3 matrices. Both run happily in S-PLUS 4.5 in
about three minutes and less than 10Mb allocated. R needs a largish
heap (20Mb failed, 30Mb seemed enough) that got partially swapped out
(the machine has 32Mb RAM) and I gave up after an hour of thrashing on
the loop version, and the vectorized version seemed in far more
page-thrashing trouble. Eventually I found just the right heap size
(24Mb) to get the loop version to run in about ten minutes. R also has
a large amount of code in memory by that stage in the computations (ca
300000 n cells used).
BTW there are enormous differences amongst S3, S-PLUS 3/4.x, S4 and
S-PLUS 5.x in this area.
From: Thomas Lumley <thomas@biostat.washington.edu>
> Some of the
> packages, because they are more recent than similar S(-PLUS) built-in
> features may be better designed (eg the tree packages from Terry Therneau
> and Brian Ripley,
To be fair, both of those went the other way, they were written as
S(-PLUS) addons and then ported (by me) to R. The only example I am
aware of going from R to S is my (still unfinished) lqs package, which
started as a re-design of some ROBETH code and ended up much more
comprehensive than what was available for S-PLUS.
> As R is much faster on _some_ code than S-PLUS I have also done
> simulations in R that I could not do in S-PLUS. Whether this counts as an
> added feature is arguable, but it can certainly be useful.
Agreed, but as my anecdote shows, much slower on other code. I have
done extensive timings on the same machine and I see only a very few
statistical jobs where the overall speed difference is more than two
either way (against S-PLUS 3.4/4.5: S-PLUS 5.0 is another ball game).
`Your mileage may differ.'
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._