The R Project SVN R

Rev

Rev 61168 | Rev 65999 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61168 Rev 61433
Line 183... Line 183...
183
stopifnot(Inf == dist(m2, method =  "euclidean"),
183
stopifnot(Inf == dist(m2, method =  "euclidean"),
184
          Inf == dist(m2, method =  "maximum"),
184
          Inf == dist(m2, method =  "maximum"),
185
          Inf == dist(m2, method =  "manhattan"))
185
          Inf == dist(m2, method =  "manhattan"))
186
##  "Inf" is same as very large number:
186
##  "Inf" is same as very large number:
187
x1 <- x; x1[6] <- 1e100
187
x1 <- x; x1[6] <- 1e100
188
stopifnot(dist(cbind(x, y), method = "canberra") == 
188
stopifnot(dist(cbind(x, y), method = "canberra") ==
189
    print(dist(cbind(x1, y), method = "canberra")))
189
    print(dist(cbind(x1, y), method = "canberra")))
190
 
190
 
191
## 2)
191
## 2)
192
y[6] <- Inf #-> 6-th pair is excluded
192
y[6] <- Inf #-> 6-th pair is excluded
193
dist(rbind(x, y), method = "binary"  )   # warning; 0.5
193
dist(rbind(x, y), method = "binary"  )   # warning; 0.5