# dist function suggestion

Friedrich Leisch Friedrich.Leisch@ci.tuwien.ac.at
Wed, 20 Jan 1999 14:24:43 +0100 (CET)

```>>>>> On Wed, 20 Jan 1999 13:09:47 +0000 (GMT),
>>>>> Prof Brian Ripley (PBR) wrote:

>> Date: Wed, 20 Jan 1999 12:03:38 +0000 (GMT)
>> From: Jonathan Rougier <J.C.Rougier@durham.ac.uk>
>> To: Friedrich Leisch <Friedrich.Leisch@ci.tuwien.ac.at>
>> cc: r-devel@stat.math.ethz.ch
>> Subject: Re: dist function suggestion
>>=20
>> On Wed, 20 Jan 1999, Friedrich Leisch wrote:
>>=20
>> > dist is contained in the mva package which comes with (base) R. it
>> > provides `"euclidian"', `"maximum"', `"manhattan"', `"canberra"' and
>> > `"binary"' distances both in matrix and triangular form.
>>=20
>> Thanks Fritz, but could I still make a general plea for a dist() that
>> takes one OR two matrices?  I often need to find dist(X, Y) as a
>> rectangular matrix (eg covariance calculations), and it is very
>> inefficient to use dist(rbind(X, Y))  and then discard most of it.=20

PBR> You will need to call it something else: dist is a clone of an S fun=
ction,
PBR> and dist(X, "manhattan") is well-established usage.

well, I don't think we need to call it something different, it's just
that the y argument may not be the 2nd one ...=20

PBR> I pointed out to R-core recently that "euclidian" will cause problem=
s
PBR> for those who know how to spell it .... (-ean in my dictionaries, an=
d
PBR> in S).

fixed (now both are legal)

--=20
-------------------------------------------------------------------
Friedrich  Leisch=20
Institut f=FCr Statistik                     Tel: (+43 1) 58801 10715
Technische Universit=E4t Wien                Fax: (+43 1) 58801 10798
Wiedner Hauptstra=DFe 8-10/1071      Friedrich.Leisch@ci.tuwien.ac.at
A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch
PGP public key http://www.ci.tuwien.ac.at/~leisch/pgp.key
-------------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```