| Title: | Functional Guilds, Invasion Status, Endemism, and Rarity of Ants |
| Version: | 0.1.0 |
| 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; Silvestre et al., 2003; Delabie et al., 2000), 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 (Vieira, 2025), identify endemic species (Silva et al., 2025), and classify species rarity and rarity forms (Silva et al., 2024). The package reduces manual effort and improves reproducibility, supporting research and biodiversity management of Neotropical ant communities. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| LazyData: | true |
| RoxygenNote: | 7.3.3 |
| Imports: | dplyr, stringr, scales, ggplot2, rlang, magrittr, stats |
| Depends: | R (≥ 3.5) |
| Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0) |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 3 |
| URL: | https://github.com/cogdebora/AntClassify |
| BugReports: | https://github.com/cogdebora/AntClassify/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-04-01 14:48:01 UTC; 55119 |
| Author: | Débora Gonçalves [aut, cre] |
| Maintainer: | Débora Gonçalves <debora_cog@outlook.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-04-09 08:50:30 UTC |
AntClassify Full Ecological Pipeline
Description
Runs all ecological classification functions of the package.
Usage
antclassify(comm)
Arguments
comm |
Community matrix (samples x species). |
Value
A list containing results from all analyses.
Assign Functional Guilds for Ants
Description
Classifies ants into functional guilds using four different ecological databases.
Usage
assign_guild_ants(comm, verbose = TRUE, plot = TRUE)
Arguments
comm |
A community matrix where species are columns and samples are rows. |
verbose |
Logical; if |
plot |
Logical; if |
Value
Invisibly returns a list with two elements:
table |
A data frame containing species, abundance, percentage, and guild assignments from each system (AntClassify, Silva, Delabie, Silvestre). |
plots |
A list of four ggplot2 objects, one for each guild classification system. |
Examples
# Create a small example community matrix
species_list <- c(
"Pachycondyla striata", "Pheidole gertrudae", "Solenopsis saevissima",
"Strumigenys denticulata", "Wasmannia auropunctata", "Nylanderia fulva",
"Odontomachus affinis", "Hypoponera foreli", "Hypoponera sp",
"Ectatomma edentatum", "Acanthognathus rudis", "Acromyrmex subterraneus"
)
set.seed(123)
comm_data <- matrix(
rpois(length(species_list) * 3, lambda = 2),
nrow = 3,
ncol = length(species_list),
dimnames = list(paste0("sample", 1:3), species_list)
)
result <- assign_guild_ants(comm_data, verbose = FALSE, plot = FALSE)
head(result$table)
Identify Endemic Ant Species (Atlantic Forest)
Description
Checks a community matrix for ant species endemic to the Brazilian Atlantic Forest based on Silva et al. (2025).
Usage
check_endemic_atlantic_ants(comm, verbose = TRUE, plot = TRUE)
Arguments
comm |
A community matrix where species are columns and samples are rows. |
verbose |
Logical; if |
plot |
Logical; if |
Value
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 showing the proportion of endemic vs. other species. |
Examples
# Create a small example community matrix
species_list <- c(
"Camponotus fallatus", "Solenopsis saevissima", "Hypoponera leninei",
"Pachycondyla striata", "Pheidole megacephala"
)
set.seed(123)
comm_data <- matrix(
rpois(length(species_list) * 3, lambda = 2),
nrow = 3,
ncol = length(species_list),
dimnames = list(paste0("sample", 1:3), species_list)
)
result <- check_endemic_atlantic_ants(comm_data, verbose = FALSE, plot = FALSE)
head(result$table)
Identify Exotic Ant Species (Brazil)
Description
Checks a community matrix for known exotic ant species in Brazil sourced from Vieira (2025).
Usage
check_exotic_ants(comm, verbose = TRUE, plot = TRUE)
Arguments
comm |
A community matrix where species are columns and samples are rows. |
verbose |
Logical; if |
plot |
Logical; if |
Value
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 showing the proportion of exotic vs. native species. |
Examples
# Create a small example community matrix
species_list <- c(
"Pachycondyla striata", "Pheidole megacephala", "Solenopsis saevissima",
"Paratrechina longicornis", "Wasmannia auropunctata"
)
set.seed(123)
comm_data <- matrix(
rpois(length(species_list) * 3, lambda = 2),
nrow = 3,
ncol = length(species_list),
dimnames = list(paste0("sample", 1:3), species_list)
)
result <- check_exotic_ants(comm_data, verbose = FALSE, plot = FALSE)
head(result$table)
Identify Ant Rarity Forms (Atlantic Forest)
Description
Checks a community matrix for ant rarity forms in the Brazilian Atlantic Forest based on Silva et al. (2024).
Usage
check_rarity_atlantic_ants(comm, verbose = TRUE, plot = TRUE)
Arguments
comm |
A community matrix where species are columns and samples are rows. |
verbose |
Logical; if |
plot |
Logical; if |
Value
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 showing the distribution of rarity forms. |
Examples
# Create a small example community matrix
species_list <- c(
"Ectatomma brunneum", "Pheidole aberrans", "Camponotus crassus",
"Solenopsis saevissima", "Pachycondyla striata"
)
set.seed(123)
comm_data <- matrix(
rpois(length(species_list) * 3, lambda = 2),
nrow = 3,
ncol = length(species_list),
dimnames = list(paste0("sample", 1:3), species_list)
)
result <- check_rarity_atlantic_ants(comm_data, verbose = FALSE, plot = FALSE)
head(result$table)
Internal datasets used by AntClassify.
Description
Internal datasets used by AntClassify.
Usage
delabie_db
endemic_db
exotic_db
generic_db
rarity_db
silva_db
silvestre_db
Format
Data frames
An object of class data.frame with 49 rows and 2 columns.
An object of class data.frame with 19 rows and 2 columns.
An object of class data.frame with 45 rows and 2 columns.
An object of class data.frame with 120 rows and 3 columns.
An object of class data.frame with 58 rows and 2 columns.
An object of class data.frame with 66 rows and 2 columns.