plot_SCBD_pq: Plot species contributions to beta diversity (SCBD) of...

View source: R/beta_div_test.R

plot_SCBD_pqR Documentation

Plot species contributions to beta diversity (SCBD) of samples

Description

lifecycle-experimental

A wrapper for the adespatial::beta.div() function in the case of physeq object.

Usage

plot_SCBD_pq(
  physeq,
  tax_level = "Taxa",
  tax_col = "Order",
  min_SCBD = 0.01,
  ...
)

Arguments

physeq

(required): a phyloseq-class object obtained using the phyloseq package.

tax_level

Taxonomic level to used in y axis

tax_col

Taxonomic level to colored points

min_SCBD

(default 0.01) the minimum SCBD value to plot the taxa

...

Other arguments passed on to adespatial::beta.div() function

Details

This function is mainly a wrapper of the work of others. Please make a reference to vegan::beta.div() if you use this function.

Value

A ggplot2 object build with the package patchwork

Author(s)

Adrien Taudière

See Also

LCBD_pq, adespatial::beta.div()

Examples

data(data_fungi)
if (requireNamespace("adespatial")) {
  plot_SCBD_pq(data_fungi) +
    geom_text(aes(label = paste(Genus, Species)), hjust = 1, vjust = 2) +
    xlim(c(0, NA))
}

if (requireNamespace("adespatial")) {
  plot_SCBD_pq(data_fungi, tax_level = "Class", tax_col = "Phylum", min_SCBD = 0) +
    geom_jitter()
}



MiscMetabar documentation built on Oct. 8, 2024, 1:07 a.m.