dist_get {usedist} | R Documentation |
Retrieve distances from a dist
object.
Description
Retrieve distances from a dist
object.
Usage
dist_get(d, idx1, idx2)
Arguments
d |
A distance matrix object of class |
idx1 , idx2 |
Indices specifying the distances to extract. |
Value
A vector of distances.
Examples
m4 <- matrix(1:16, nrow=4, dimnames=list(LETTERS[1:4]))
dm4 <- dist(m4)
dist_get(dm4, "A", "C")
dist_get(dm4, "A", c("A", "B", "C", "D"))
dist_get(dm4, c("A", "B", "C"), c("B", "D", "B"))
[Package usedist version 0.4.0 Index]