This function computes beta diversity partition (Jaccard or Sorensen) using the betapart package, and plots the ordination (PCoA/NMDS) with gg_ordiplot.
beta_partition_plot(
table,
metadata,
index = "jaccard",
group_col = NULL,
shape_col = NULL,
legend_title = NULL,
point_size = 3,
colors = NULL,
save_table = TRUE,
table_filename = "SAMPLE1"
)Abundance matrix (samples in rows, species/features in columns).
Data frame with sample metadata. First column must be SampleID.
Family of dissimilarity: "jaccard" (default) or "sorensen".
Column in metadata to use as color grouping.
Optional column in metadata for point shapes.
Optional custom legend title.
Optional named vector of colors for groups.
A combined cowplot panel of beta diversity partition plots.
beta_partition_plot(table=table,
metadata= metadata,
group_col="metodo",
point_size = 4,
colors = c("gray", "blue"))
#> Error in table_pa > 0: comparison (>) is possible only for atomic and list types