z_diversity_decay | R Documentation |
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 class 'zeta_decay'
plot(x, ribbon = TRUE, ...)
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. |
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.