dist_get | R Documentation |
dist
object.Retrieve distances from a dist
object.
dist_get(d, idx1, idx2)
d |
A distance matrix object of class |
idx1 , idx2 |
Indices specifying the distances to extract. |
A vector of distances.
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.