[R] Canberra distance

2009-12-01 Thread Hongbo Zhu
Hi, I am using R 2.9.0. It seems the documentation for the calculation of Canberra distance using stats::dist is ambiguous. Does anyone have the original definition given in the Lance & Williams paper from Aust. Comput. J. 1, 15-20, 1967? When there are zeros at certain position in both vectors,

Re: [R] Canberra distance

2007-10-17 Thread Stéphane Dray
Frédéric Chiroleu wrote: > PS : Be careful with function dudi.pca() from ade4 ; in values, "norm" > doesn't give you what is written in the help page : "norm" returns the > vector of standard deviations of initial variables when you choose > "normed" PCA and the vector of standard deviations of

Re: [R] Canberra distance

2007-10-16 Thread Jari Oksanen
Frédéric Chiroleu cirad.fr> writes: > > Hi, > > I misunderstand the definition of Canberra distance in R. > > On Internet and in function description pages of dist() from stats and > Dist() from amap, Canberra distance between vectors x and y, d(x,y), is : > > d(x,y) = sum(abs(x-y)/(x+y)) >

[R] Canberra distance

2007-10-16 Thread Frédéric Chiroleu
Hi, I misunderstand the definition of Canberra distance in R. On Internet and in function description pages of dist() from stats and Dist() from amap, Canberra distance between vectors x and y, d(x,y), is : d(x,y) = sum(abs(x-y)/(x+y)) But in use, through simple examples, we find that the form