This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-162216788-916833047=:29339 Content-Type: TEXT/PLAIN; charset=US-ASCII On my R installation (0.62.4) there is no dist() function, so I attach one possibility. It provides Euclidean distances only, but it does compute dist(X, Y) as a matrix, as well as dist(X) as a vector of lower-triangular values; naturally dist(X, X) gives the full distance matrix of X. Hope this is useful, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) ---559023410-162216788-916833047=:29339 Content-Type: APPLICATION/octet-stream; name="dist.tar.gz" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.GSO.3.96.990120115047.29339I@laplace> Content-Description: H4sICOC/pTYAA2Rpc3QudGFyAO1W32/bNhDua/VX3FIUkAbFkOw4A7rloSha oHsp0L5YiFOAlmiFi0SpJBU7E/y/9470z1ZyU2DZ9uB7sEne8eN3xxPvMqHN 4OOzJ5UojqLLi4tnURQN4/HQ/l8M7TyyayNcu7wcx6PRb2O7Hg9HtPa0tJw0 2jCFR2Yli/5KVa8d6o/iWE8uRs6pePRP03wqyfD+4Y9zmDcyNaKS4E9CSALw Wg/2ZEI2TA9KZpRY+pPgQCvm4JdCayFzPwkCONy7kYQwJp2qO1JJVS2+Rd6I tAZpVfQZZCVZZILl/l23hXVhck2HZGVwXVQLrgboDc1uQgghU1V99e6mn3ty TQR+frO6Z8U6fvc8NZXy/QkgXPB5CC9/fQmK134cggy6iTNjlE8YIZx9En/z s4DA7g5sVwczXmh+7BJ2F5n0RFOUyweyTH0cYsyvY/SShgkNuzdRFhRc5ubW t9fVSPGl4f4WYriDGN4EmCa/XEEn0Ebi4Lhem6r2z95jWpQ1M2JWcLBupVyf 9fglbZoUmPTESrKSa6KGPjlybiVxK8fziC7tlQ3UJjg4QscemUr7+ykyNO9A +yHcJrl6Uqrvem1CBe6bwaP6zFw8drayPJJ2+osyztZbed5//bKd5DGS2fqf PekZP6j/8fhyr/6PXP0fR+NT/f8XZEpfeEtZgJ/s1AhT8PZtkxYi40wCrTOZ ctI1muXO0rUItMYKwfR2N1N5U3JpNJaeqTC8bCer9rV7k5dQzaGuBGoHq406 QbWszC1X4Fc1tR/0znTYr7xpxnWqhDVqvTf44jeGA26F79nCjJsF59KqHQYI CdO0yjhSAiYzr0uVrAYA7+fbGQgN67YmJCwJlSweaOTZBuAceTKZNwVTUDNl iDLhbnnsPNmeLbSXOvLZgGKGr2XDWw9PnWEgDjjueDDFIRf3XIbAOtA9fKi5 1NS9uS09VZvc+0DRXgjsDxi4ZsQBOEwNRE4Jctm68ig/ve/9DGEh0B1qXcSM bsopqH1ZkSsbfNmUM6483Il9md5HsNFhjbmtVPsnJoa5xRv+WDW54IpUfMnK uuCYazYl41fjEPAn8F6Ayw46gkHOGrxA3JpWSvGC2R7X8fVsJV83Qgq7lbk/ jrDeUpt5FUfB79is8mXtn7ucx9IaPH/+Apunbej21SE4i7XB+ghiescfFpXK WqYUe1id6uJJTnKS/4l8BbYXpwQAEgAA ---559023410-162216788-916833047=:29339-- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> On Wed, 20 Jan 1999 11:50:47 +0000 (GMT), >>>>> Jonathan Rougier (JR) wrote:JR> On my R installation (0.62.4) there is no dist() function, so I attach one JR> possibility. It provides Euclidean distances only, but it does compute JR> dist(X, Y) as a matrix, as well as dist(X) as a vector of lower-triangular JR> values; naturally dist(X, X) gives the full distance matrix of X. 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. I couldn't open the tar file you attached, so I couldn't check your version. Best, Fritz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 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 > > On Wed, 20 Jan 1999, Friedrich Leisch wrote: > > > 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. > > 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.You will need to call it something else: dist is a clone of an S function, and dist(X, "manhattan") is well-established usage. I pointed out to R-core recently that "euclidian" will cause problems for those who know how to spell it .... (-ean in my dictionaries, and in S). -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._