[R] Problem with dist (bug?)

2009-10-02 Thread Corrado
Dear list, using package proxy. In one situation, the dissimilarity between two vectors based on method=correlation returns a value of 1.9. That should not happen, should it? The correlation is normally the cos() of the angle between the two vectors That dissimilarity Any clue?

Re: [R] Problem with dist (bug?)

2009-10-02 Thread Corrado
Dear list, here is the code that generates the problem: library(proxy) scot-read.csv(scot.csv,header=TRUE) scot24_climate-scot24[,1105:1109] # Scotland dist_scot24_climate- dist(scot24_climate,method=correlation,diag=TRUE,upper=TRUE) max(dist_scot24_climate) is 1.9. I do not think it should