dist function suggestion

Jonathan Rougier J.C.Rougier@durham.ac.uk
Wed, 20 Jan 1999 11:50:47 +0000 (GMT)


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