Make a distance matrix of samples vs samples.

beta.div(biom, method, weighted = TRUE, tree = NULL)

## Arguments

biom |
A `matrix` , `simple_triplet_matrix` , or `BIOM`
object, as returned from read.biom. For matrices, the rows and
columns are assumed to be the taxa and samples, respectively. |

method |
The distance algorithm to use. Options are:
**“manhattan”**, **“euclidean”**,
**“bray-curtis”**, **“jaccard”**, and
**“unifrac”**. Non-ambiguous abbrevations of the method
names are also accepted. A phylogentic tree must be present in
`biom` or explicitly provided via `tree=` to use the UniFrac methods. |

weighted |
Take relative abundances into account. When
`weighted=FALSE` , only presence/absence is considered. |

tree |
A `phylo` object representing the phylogenetic
relationships of the taxa in `biom` . Will be taken from the tree
embedded in the `biom` object if not explicitly specified. Only
required for computing UniFrac distance matrices. |

## Value

A distance matrix.

## Examples

#> HMP01 HMP02 HMP03 HMP04
#> HMP01 0.0000000 0.1950253 0.3687298 0.4239831
#> HMP02 0.1950253 0.0000000 0.2101679 0.3187533
#> HMP03 0.3687298 0.2101679 0.0000000 0.3040937
#> HMP04 0.4239831 0.3187533 0.3040937 0.0000000