dist_groups | R Documentation |
Create a data frame of distances between groups of items.
dist_groups(d, g)
d |
A distance matrix object of class |
g |
A factor representing the groups of objects in |
A data frame with 6 columns:
The items being compared.
The groups to which the items belong.
A convenient label for plotting or comparison.
The distance between Item1 and Item2.
m4 <- matrix(1:16, nrow=4, dimnames=list(LETTERS[1:4]))
dm4 <- dist(m4)
g4 <- rep(c("Control", "Treatment"), each=2)
dist_groups(dm4, g4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.