R: Create a data frame of distances between groups of items.

dist_groups {qiimer} | R Documentation

## Create a data frame of distances between groups of items.

### Description

Create a data frame of distances between groups of items.

### Usage

    dist_groups(d, g)

### Arguments

`d` | A distance matrix object of class '"dist"'.
`g` | A factor representing the groups of objects in 'd'.

### Value

A data frame with 6 columns. "Item1" and "Item2" identify the items compared, using the label if available. Likewise, "Group1" and "Group2" identify the groups of the items. "Label" is a factor giving a convenient label for the type of comparison. Finally, "Distance" contains the distance of interest.

### Examples

    data(relmbeta_dist)
    data(relmbeta)
    head(dist_groups(relmbeta_dist, relmbeta$Diet))

[Package qiimer version 0.9.4 Index]