View source: R/antclassify_community.R
| antclassify_community | R Documentation |
Applies the AntClassify pipeline to each site (row) of a community matrix and returns aggregated guild abundance and richness matrices.
antclassify_community(comm, guild_col = "antclassify_guild", ...)
comm |
A community matrix with sites as rows and species as columns. Species names must match the nomenclature used in the internal databases. |
guild_col |
Character string giving the name of the guild column to use
for aggregation. Must be one of |
... |
Additional arguments passed to |
A list with three components:
by_site |
A list of length equal to |
guild_abundance |
A matrix of guild abundances (sites × guilds). |
guild_richness |
A numeric vector of length |
# Small community matrix with two sites and six species
comm <- matrix(c(5, 0, 2, 0, 1, 3,
2, 4, 0, 2, 0, 0),
nrow = 2, byrow = TRUE,
dimnames = list(c("Site1", "Site2"),
c("Atta sexdens", "Camponotus atriceps",
"Pheidole megacephala", "Wasmannia auropunctata",
"Solenopsis saevissima", "Nylanderia fulva")))
# Run the classification (validate = FALSE to avoid GBIF calls in examples)
results <- antclassify_community(comm, guild_col = "antclassify_guild",
validate = FALSE)
results$guild_abundance
results$guild_richness
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.