Skip to contents

Takes a `phyloseq` object with samples grouped in the sample data, calculates all pairwise beta-diversity metrics, and plots the distances in facets. Now it returns a list where the df can be accessed with $df, and the plot can be accessed with $plot.

Usage

plot_distances(
  p = GlobalPatterns,
  m = "wunifrac",
  s = "X.SampleID",
  d = "SampleType"
)

Arguments

p

A phyloseq object

m

Distance metric

s

Column name with sample IDs

d

Grouping for comparisons