This function calculates Zeta diversity for each group in the provided otutab.
A matrix or data frame containing OTU (Operational Taxonomic Unit) counts.
Site coordinates.
A data frame containing group information.
Additional parameters to be passed to the Zeta.ddecay function from the zetadiv package.
Zeta diversity results obtained from z_diversity_decay function.
Logical, whether to add a ribbon to the plot for standard deviation.
Additional arguments to be passed to ggplot2 functions.
zeta_decay
A ggplot object.
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