[R] distance between two matrices

"Hüsing, Johannes" johannes.huesing at medizin.uni-essen.de
Wed Jan 28 16:25:22 CET 2004

> From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
> On Wed, 28 Jan 2004, "Hüsing, Johannes" wrote:
> > ?apply for more info. You'll want to know about apply if
> > you want to avoid loops (which is a good approach).
> Unfortunately apply() is a wrapper for a for() loop, so will 
> not help much 
> (if at all).

whoops; so is the choice between both a matter of style? Or is
it implementation-specific for R, and not generally true for S?

(I know from LISP that if using map, roughly the equivalent to
S' apply instead of the do loop, you cannot rely on the elements 
being executed in their original order, which might buy you 
efficiency depending on the implementation.)

More information about the R-help mailing list