z_diversity_decay: Calculate Zeta Diversity with Distance

View source: R/a_diversity.R

z_diversity_decayR Documentation

Calculate Zeta Diversity with Distance

Description

This function calculates Zeta diversity for each group in the provided otutab.

Usage

z_diversity_decay(otutab, xy_df, group_df = NULL, zetadiv_params = list())

## S3 method for class 'zeta_decay'
plot(x, ribbon = TRUE, ...)

Arguments

otutab

A matrix or data frame containing OTU (Operational Taxonomic Unit) counts.

xy_df

Site coordinates.

group_df

A data frame containing group information.

zetadiv_params

Additional parameters to be passed to the Zeta.ddecay function from the zetadiv package.

x

Zeta diversity results obtained from z_diversity_decay function.

ribbon

Logical, whether to add a ribbon to the plot for standard deviation.

...

Additional arguments to be passed to ggplot2 functions.

Value

zeta_decay

A ggplot object.

Examples

if (requireNamespace("zetadiv")) {
  data(otutab, package = "pcutils")
  zeta_decay_result <- z_diversity_decay(otutab, metadata[, c("lat", "long")],
    metadata["Group"],
    zetadiv_params = list(sam = 10)
  )
  plot(zeta_decay_result)
}

pctax documentation built on May 29, 2024, 10:03 a.m.