| Title: | Functional Guilds, Invasion Status, Endemism, and Rarity of Ants |
|---|---|
| Description: | Provides functions for the analysis of ant communities, aiming to standardize workflows in myrmecology. The package automates the assignment of species to functional guilds based on trophic strategies, feeding habits, and foraging behavior, using established classification frameworks (Silva et al., 2015 <doi:10.7476/9788574554419>; Silvestre et al., 2003 <isbn:9588151236>; Delabie et al., 2000 <https://www.researchgate.net/publication/44961742_Sampling_Ground-Dwelling_Ants_Case_Studies_from_the_Worlds_Rain_Forests>), and also includes a novel classification system implemented within the package, developed from ant species occurring in urban environments. It also includes routines to flag exotic species of Brazil (Vieira, 2025, unpublished master's thesis), identify endemic species (Silva et al., 2025 <doi:10.37885/250920259>), and classify species rarity and rarity forms of the Atlantic Forest (Silva et al., 2024 <doi:10.1016/j.biocon.2024.110640>). The package reduces manual effort and improves reproducibility, supporting research and biodiversity management of Neotropical ant communities. |
| Authors: | Débora C. O. Gonçalves [aut, cre], Nathalia S. Silva [aut], Rony P. S. Almeida [aut], Lívia P. Prado [aut], Maria S. C. Morini [aut] |
| Maintainer: | Débora C. O. Gonçalves <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-05-23 09:24:30 UTC |
| Source: | https://github.com/cogdebora/antclassify |
A sample community matrix of ant species abundances with 3 sites and 6 species. Rows represent sites, columns represent species.
data(ant_community)data(ant_community)
A data frame with 3 rows and 6 columns:
abundance of Atta sexdens
abundance of Camponotus atriceps
abundance of Pheidole megacephala
abundance of Wasmannia auropunctata
abundance of Solenopsis saevissima
abundance of Nylanderia fulva
Simulated data for package examples.
data(ant_community) head(ant_community)data(ant_community) head(ant_community)
Runs all ecological classification functions of the package.
antclassify(comm, verbose = TRUE, plot = TRUE, validate = TRUE, delay = 0.5)antclassify(comm, verbose = TRUE, plot = TRUE, validate = TRUE, delay = 0.5)
comm |
Community matrix (samples x species). Species names as columns, samples as rows. |
verbose |
Logical; if TRUE, displays progress messages. |
plot |
Logical; if TRUE, displays guild proportion plots (passed to assign_guild_ants). |
validate |
Logical; if TRUE, validates species names using GBIF. |
delay |
Numeric; seconds between API calls (if validate = TRUE). |
A list containing results from all analyses (guilds, exotic, endemic, rarity).
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", ...)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) res <- antclassify_community(comm, guild_col = "antclassify_guild", validate = FALSE) res$guild_abundance res$guild_richness# 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) res <- antclassify_community(comm, guild_col = "antclassify_guild", validate = FALSE) res$guild_abundance res$guild_richness
Classifies ants into functional guilds using four different ecological databases.
assign_guild_ants( comm, verbose = TRUE, plot = TRUE, validate = TRUE, delay = 0.5 )assign_guild_ants( comm, verbose = TRUE, plot = TRUE, validate = TRUE, delay = 0.5 )
comm |
A community matrix where species are columns and samples are rows. |
verbose |
Logical; if |
plot |
Logical; if |
validate |
Logical; if |
delay |
Numeric; seconds to wait between GBIF API calls when |
Invisibly returns a list with two elements:
table |
A data frame containing species, abundance, percentage, and guild assignments from each system. |
plots |
A list of four ggplot2 objects, one for each guild classification system. |
Checks a community matrix for ant species endemic to the Brazilian Atlantic Forest based on Silva et al. (2025).
check_endemic_atlantic_ants( comm, verbose = TRUE, plot = TRUE, plot_type = c("status", "species"), validate = TRUE, delay = 0.5 )check_endemic_atlantic_ants( comm, verbose = TRUE, plot = TRUE, plot_type = c("status", "species"), validate = TRUE, delay = 0.5 )
comm |
A community matrix where species are columns and samples are rows. |
verbose |
Logical; if |
plot |
Logical; if |
plot_type |
Character; type of plot to display. |
validate |
Logical; if |
delay |
Numeric; seconds to wait between GBIF API calls when |
Invisibly returns a list with two elements:
table |
A data frame containing endemic species detected, with columns species, abundance, and percentage. |
plot |
A ggplot2 object. |
Checks a community matrix for known exotic ant species in Brazil sourced from Vieira (2025).
check_exotic_ants( comm, verbose = TRUE, plot = TRUE, plot_type = c("status", "species"), validate = TRUE, delay = 0.5 )check_exotic_ants( comm, verbose = TRUE, plot = TRUE, plot_type = c("status", "species"), validate = TRUE, delay = 0.5 )
comm |
A community matrix where species are columns and samples are rows. |
verbose |
Logical; if |
plot |
Logical; if |
plot_type |
Character; type of plot to display. |
validate |
Logical; if |
delay |
Numeric; seconds to wait between GBIF API calls when |
Invisibly returns a list with two elements:
table |
A data frame containing exotic species detected, with columns species, abundance, and percentage. |
plot |
A ggplot2 object. |
Checks a community matrix for ant rarity forms in the Brazilian Atlantic Forest based on Silva et al. (2024).
check_rarity_atlantic_ants( comm, verbose = TRUE, plot = TRUE, plot_type = c("status", "species"), validate = TRUE, delay = 0.5 )check_rarity_atlantic_ants( comm, verbose = TRUE, plot = TRUE, plot_type = c("status", "species"), validate = TRUE, delay = 0.5 )
comm |
A community matrix where species are columns and samples are rows. |
verbose |
Logical; if |
plot |
Logical; if |
plot_type |
Character; type of plot to display. |
validate |
Logical; if |
delay |
Numeric; seconds to wait between GBIF API calls when |
Invisibly returns a list with two elements:
table |
A data frame containing rare species detected, with columns species, rarity_form, abundance, and percentage. |
plot |
A ggplot2 object. |
Checks species names against the GBIF taxonomic backbone. If an exact match is found, the accepted name (or canonical name) is used. If no exact match is found, the original name is kept and a warning is issued, indicating that the name may be outdated or misspelled.
validate_species_names(comm, verbose = TRUE, delay = 0.5)validate_species_names(comm, verbose = TRUE, delay = 0.5)
comm |
A community matrix (rows = sites, columns = species). |
verbose |
Logical; if TRUE, displays progress messages. |
delay |
Numeric; seconds to wait between API calls (default 0.5). |
A community matrix with updated column names (accepted names when available).
## Not run: data(ant_community) comm_validated <- validate_species_names(ant_community, verbose = TRUE) ## End(Not run)## Not run: data(ant_community) comm_validated <- validate_species_names(ant_community, verbose = TRUE) ## End(Not run)