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

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

# S3 method for 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)
}
#> Loading required namespace: zetadiv