[R] recycling rule
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Wed Nov 24 08:33:36 CET 1999
On Tue, 23 Nov 1999, Thomas Lumley wrote:
> On Wed, 24 Nov 1999, Research Division wrote:
>
> > I was illustrating the use of R to some of my students
> > here in the Philippines:
> > The following question was posed: "is there any
> > motivation for the development
> > of the recycling rule for vector
> > manipulation, especially for fractional replication?"
> > I had no idea how to answer this.
>
> For integer replication I think the motivation is to handle
> vector+scalar, vector+matrix, and scalar+matrix operations.
I think it is buried in the mists of time, but apart from these there
are efficiency shortcuts for other common operations where a scalar
needs to be expanded to a vector, e.g. in the args to rnorm.
> I would say that the fractional replication is just a side-effect.
Possibly even originally unintentional. It is not allowed in current
versions of S (S, not necessarily S-PLUS) and should probably be
discouraged.
--
Brian D. Ripley, ripley at 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-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list