powered by
Create a data frame of distances between groups of items.
dist_groups(d, g)
A distance matrix object of class dist.
dist
A factor representing the groups of objects in d.
d
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.
# NOT RUN { 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) # }
Run the code above in your browser using DataLab