title: “AntClassify: An R Package for Standardized Classification of Ant Communities, Functional Guilds, Endemism, and Rarity” output: rmarkdown::html_vignette vignette: > % % %
The AntClassify package provides an integrated ecological pipeline to classify ant communities into functional guilds, identify exotic species, detect endemic and rare species of the Atlantic Forest, and quantify key ecological patterns.
This tool was developed to facilitate ecological analyses, standardize functional classification, and improve reproducibility in ant community studies. By integrating multiple ecological databases into a single workflow, AntClassify allows researchers to efficiently assess community structure, biological invasions, endemism, and rarity patterns.
The package is particularly useful for biodiversity monitoring, conservation planning, and macroecological research involving ant assemblages.
AntClassify aims to provide a standardized and reproducible framework for advancing ecological research on ant communities.
dados <- data.frame(
Atta_sexdens = 50,
Camponotus_atriceps = 40,
Crematogaster_sp = 35,
Cyphomyrmex_minutus = 30,
Cyphomyrmex_rimosus = 28,
Ectatomma_edentatum = 25,
Heteroponera_mayri = 22,
Holcoponera_striatula = 20,
Monomorium_floricola = 18,
Monomorium_pharaonis = 17,
Pheidole_megacephala = 16,
Strumigenys_emmae = 15,
Strumigenys_rogeri = 14,
Nylanderia_fulva = 13,
Odontomachus_chelifer = 12,
Oxyepoecus_reticulatus = 11,
Pachycondyla_striata = 10,
Apterostigma_serratum = 9,
Brachymyrmex_delabiei = 8,
Brachymyrmex_feitosai = 7,
Camponotus_fallatus = 6,
Camponotus_hermanni = 5,
Camponotus_xanthogaster = 4,
Pheidole_aberrans = 3,
Pheidole_fimbriata = 3,
Pheidole_obscurithorax = 2,
Pheidole_subarmata = 2,
Strumigenys_fridericimuelleri = 2,
Heteroponera_inermis = 2,
Oxyepoecus_browni = 2,
Sphinctomyrmex_stali = 1,
Strumigenys_sanctipauli = 1,
Brachymyrmex_micromegas = 1,
Camponotus_tripartitus = 1,
Diaphoromyrma_sofiae = 1
)
colnames(dados) <- gsub("_", " ", colnames(dados))
dados
#> Atta sexdens Camponotus atriceps Crematogaster sp Cyphomyrmex minutus
#> 1 50 40 35 30
#> Cyphomyrmex rimosus Ectatomma edentatum Heteroponera mayri
#> 1 28 25 22
#> Holcoponera striatula Monomorium floricola Monomorium pharaonis
#> 1 20 18 17
#> Pheidole megacephala Strumigenys emmae Strumigenys rogeri Nylanderia fulva
#> 1 16 15 14 13
#> Odontomachus chelifer Oxyepoecus reticulatus Pachycondyla striata
#> 1 12 11 10
#> Apterostigma serratum Brachymyrmex delabiei Brachymyrmex feitosai
#> 1 9 8 7
#> Camponotus fallatus Camponotus hermanni Camponotus xanthogaster
#> 1 6 5 4
#> Pheidole aberrans Pheidole fimbriata Pheidole obscurithorax
#> 1 3 3 2
#> Pheidole subarmata Strumigenys fridericimuelleri Heteroponera inermis
#> 1 2 2 2
#> Oxyepoecus browni Sphinctomyrmex stali Strumigenys sanctipauli
#> 1 2 1 1
#> Brachymyrmex micromegas Camponotus tripartitus Diaphoromyrma sofiae
#> 1 1 1 1resultado <- antclassify(dados, validate = FALSE, plot = FALSE)
#> *************************************************
#> Starting AntClassify
#> *************************************************
#>
#> >>> Running guild classification
#> Step 1: Preparing community data...
#> Step 2: Matching species to functional guilds...
#> Database (silva_db) version: 1.0.0
#> Database (delabie_db) version: 1.0.0
#> Database (silvestre_db) version: 1.0.0
#>
#> WARNING: Ambiguous functional guild classification detected.
#>
#> Some taxa could not be assigned to a single functional guild according to Silvestre et al. (2003).
#>
#> This ambiguity occurs because the original classification associates different species within the same genus with different functional guilds, reflecting differences in their ecological habits, foraging behavior, nesting strategies, and habitat use.
#>
#> Because identification was available only at the genus level, it was not possible to determine which guild best represents the taxa in the dataset.
#>
#> The taxa were therefore assigned to an 'Ambiguous classification' category, and the possible guilds were recorded in the results table. Abundance was not duplicated.
#>
#> Affected taxa and possible classifications:
#> species abundance silvestre_guild
#> 3 Crematogaster sp 35 Ambiguous classification: Crematogaster
#> 21 Camponotus fallatus 6 Ambiguous classification: Camponotus
#> 22 Camponotus hermanni 5 Ambiguous classification: Camponotus
#> 23 Camponotus xanthogaster 4 Ambiguous classification: Camponotus
#> 34 Camponotus tripartitus 1 Ambiguous classification: Camponotus
#> silvestre_guild_candidates
#> 3 Dominant soil omnivores | Small arboreal species with massive recruitment
#> 21 Soil and vegetation opportunists | Generalist patrolling Camponotines
#> 22 Soil and vegetation opportunists | Generalist patrolling Camponotines
#> 23 Soil and vegetation opportunists | Generalist patrolling Camponotines
#> 34 Soil and vegetation opportunists | Generalist patrolling Camponotines
#>
#> Guild classification results (first 6 rows):
#> species abundance percentage
#> 1 Atta sexdens 50 11.467890
#> 2 Camponotus atriceps 40 9.174312
#> 3 Crematogaster sp 35 8.027523
#> 4 Cyphomyrmex minutus 30 6.880734
#> 5 Cyphomyrmex rimosus 28 6.422018
#> 6 Ectatomma edentatum 25 5.733945
#> antclassify_guild
#> 1 Fungus-growers (soil or leaf litter nesting)
#> 2 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 3 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 4 Fungus-growers (soil or leaf litter nesting)
#> 5 Fungus-growers (soil or leaf litter nesting)
#> 6 Generalist predators (dominant, cryptic, epigeic, or arboreal)
#> antclassify_guild_status
#> 1 Assigned
#> 2 Assigned
#> 3 Assigned
#> 4 Assigned
#> 5 Assigned
#> 6 Assigned
#> antclassify_guild_notes
#> 1 <NA>
#> 2 <NA>
#> 3 <NA>
#> 4 <NA>
#> 5 <NA>
#> 6 Predacao e componente importante da ecologia conhecida; nao implica exclusividade alimentar.
#> antclassify_foraging_strategy antclassify_assignment_level
#> 1 <NA> genus
#> 2 <NA> genus
#> 3 <NA> genus
#> 4 <NA> genus
#> 5 <NA> genus
#> 6 <NA> genus
#> antclassify_guild_options antclassify_guild_is_ambiguous
#> 1 Fungus-g.... FALSE
#> 2 Generali.... TRUE
#> 3 Generali.... FALSE
#> 4 Fungus-g.... FALSE
#> 5 Fungus-g.... FALSE
#> 6 Generali.... FALSE
#> silva_guild
#> 1 Unidentified Guild
#> 2 Unidentified Guild
#> 3 Unidentified Guild
#> 4 Unidentified Guild
#> 5 Unidentified Guild
#> 6 Generalist predatory ectaheteromorphs
#> delabie_guild delabie_guild_candidates
#> 1 Attini (Fungus-growers) No alternative classification
#> 2 Omnivorous soil-and-litter species No alternative classification
#> 3 Omnivorous soil-and-litter species No alternative classification
#> 4 Attini (Fungus-growers) No alternative classification
#> 5 Attini (Fungus-growers) No alternative classification
#> 6 Large Ponerinae (Large epigeic predators) No alternative classification
#> silvestre_guild
#> 1 Unidentified Guild
#> 2 Generalist patrolling Camponotines
#> 3 Ambiguous classification: Crematogaster
#> 4 Cryptic fungus-growing ants (Attines)
#> 5 Cryptic fungus-growing ants (Attines)
#> 6 Large predators
#> silvestre_guild_candidates
#> 1 No alternative classification
#> 2 No alternative classification
#> 3 Dominant soil omnivores | Small arboreal species with massive recruitment
#> 4 No alternative classification
#> 5 No alternative classification
#> 6 No alternative classification
#> Step 3: Generating plots...
#>
#> Guild classification sources: Delabie et al. (2000), Silvestre et al. (2003),
#> Silva et al. (2015), and AntClassify internal database.
#> Full citations are available in the package documentation: ?assign_guild_ants
#>
#> >>> Checking exotic species
#> Step 1: Preparing community data...
#> Step 2: Generating results...
#> exotic_db version: 2.0.0
#>
#> ********************************************************************************
#> EXOTIC SPECIES DETECTED:
#> species origin
#> 1 Monomorium floricola Exotic
#> 2 Monomorium pharaonis Exotic
#> 3 Nylanderia fulva Exotic (native in some regions)
#> 4 Pheidole megacephala Exotic
#> 5 Strumigenys emmae Exotic
#> 6 Strumigenys rogeri Exotic
#> source abundance percentage
#> 1 Wong et al. 2023; Vieira 2025 18 4.128440
#> 2 Wong et al. 2023; Vieira 2025 17 3.899083
#> 3 Wong et al. 2023 13 2.981651
#> 4 Wong et al. 2023; Vieira 2025 16 3.669725
#> 5 Wong et al. 2023; Vieira 2025 15 3.440367
#> 6 Vieira 2025 14 3.211009
#>
#> DATA SOURCES:
#> Wong, M. K. L., Guénard, B., & Economo, E. P. (2023).
#> The global spread and invasion capacities of alien ants.
#> Current Biology, 33(3), 566-571.
#> Vieira, V. B. (2025). "Quem são e onde estão as formigas exóticas do Brasil?"
#> Master's thesis, Universidade Federal do Paraná, Curitiba, Brazil.
#> Full references available in the package documentation: ?check_exotic_ants
#> ********************************************************************************
#>
#> >>> Checking Atlantic Forest endemic species
#>
#> **********************************************************************************
#> ATTENTION: This function identifies endemic species of the BRAZILIAN ATLANTIC FOREST.
#> If your data collection did not occur within this biome, this analysis may not
#> be appropriate for your study.
#> **********************************************************************************
#> Step 1: Preparing community data...
#> Step 2: Generating results...
#> endemic_db version: 1.0.0
#>
#> ********************************************************************************
#> ENDEMIC SPECIES DETECTED (ATLANTIC FOREST):
#> species abundance percentage
#> 1 Apterostigma serratum 9 2.064220
#> 2 Brachymyrmex delabiei 8 1.834862
#> 3 Brachymyrmex feitosai 7 1.605505
#> 4 Camponotus fallatus 6 1.376147
#> 5 Camponotus hermanni 5 1.146789
#>
#> DATA SOURCE:
#> Silva, N. S., Goncalves, D. C. de O., Wazema, C. T., Barbosa, D. A., Prado, L. P. do,
#> Andrade-Silva, J., Fernandes, T. T., Silva, R. R., & Morini, M. S. de C. (2025).
#> 'Endemism and vulnerability of ants in the phytophysiognomies of the Brazilian
#> Atlantic Forest'. In: Brazilian Myrmecology: Exploring the World's Richest Ant Fauna
#> (Chapter 16). Editora Cientifica Digital. DOI: 10.37885/250920259.
#> Full reference available in the package documentation: ?check_endemic_atlantic_ants
#> ********************************************************************************
#>
#> >>> Checking Atlantic Forest rarity patterns
#>
#> ********************************************************************************
#> ATTENTION:
#> This function identifies rare ant species and their rarity forms.
#> This classification is specific to the Brazilian Atlantic Forest and
#> may not be appropriate for other biomes.
#> ********************************************************************************
#> Step 1: Preparing community data and rarity database...
#> Rarity database (rarity_db) version: 2.0.0
#> Step 2: Generating results...
#>
#> ********************************************************************************
#> RARE SPECIES DETECTED:
#> species rarity_form abundance percentage
#> 1 Brachymyrmex feitosai Form 4 7 1.6055046
#> 2 Brachymyrmex micromegas Form 7 1 0.2293578
#> 3 Camponotus atriceps Form 2 40 9.1743119
#> 4 Camponotus tripartitus Form 7 1 0.2293578
#> 5 Diaphoromyrma sofiae Form 7 1 0.2293578
#> 6 Heteroponera inermis Form 4 2 0.4587156
#> 7 Oxyepoecus browni Form 6 2 0.4587156
#> 8 Oxyepoecus reticulatus Form 1 11 2.5229358
#> 9 Pheidole aberrans Form 2 3 0.6880734
#> 10 Pheidole fimbriata Form 2 3 0.6880734
#> 11 Pheidole obscurithorax Form 2 2 0.4587156
#> 12 Pheidole subarmata Form 2 2 0.4587156
#> 13 Sphinctomyrmex stali Form 6 1 0.2293578
#> 14 Strumigenys fridericimuelleri Form 3 2 0.4587156
#> 15 Strumigenys sanctipauli Form 6 1 0.2293578
#>
#> NOTE: 20 species were NOT assessed (not in the Atlantic Forest rarity database).
#> These are UNASSESSED, not "common". They are absent from rarity_db,
#> so no rarity form can be assigned to them here.
#> Unassessed species: Apterostigma serratum, Atta sexdens, Brachymyrmex delabiei, Camponotus fallatus, Camponotus hermanni, Camponotus xanthogaster, Crematogaster sp, Cyphomyrmex minutus, Cyphomyrmex rimosus, Ectatomma edentatum, Heteroponera mayri, Holcoponera striatula, Monomorium floricola, Monomorium pharaonis, Nylanderia fulva, Odontomachus chelifer, Pachycondyla striata, Pheidole megacephala, Strumigenys emmae, Strumigenys rogeri
#>
#> DATA SOURCE AND REFERENCE:
#> Silva, N. S., Maciel, E. A., Prado, L. P., Silva, O. G., Barbosa, D. A.,
#> Andrade-Silva, J., ... & Morini, M. S. (2024).
#> 'Ant rarity and vulnerability in Brazilian Atlantic Forest fragments.'
#> Biological Conservation, 296, 110640. https://doi.org/10.1016/j.biocon.2024.110640
#> ********************************************************************************
#>
#> ***********************************************
#> AntClassify finished successfully
#> *************************************************names(resultado)
#> [1] "guilds" "exotic" "endemic" "rarity"
head(resultado$guilds$table)
#> species abundance percentage
#> 1 Atta sexdens 50 11.467890
#> 2 Camponotus atriceps 40 9.174312
#> 3 Crematogaster sp 35 8.027523
#> 4 Cyphomyrmex minutus 30 6.880734
#> 5 Cyphomyrmex rimosus 28 6.422018
#> 6 Ectatomma edentatum 25 5.733945
#> antclassify_guild
#> 1 Fungus-growers (soil or leaf litter nesting)
#> 2 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 3 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 4 Fungus-growers (soil or leaf litter nesting)
#> 5 Fungus-growers (soil or leaf litter nesting)
#> 6 Generalist predators (dominant, cryptic, epigeic, or arboreal)
#> antclassify_guild_status
#> 1 Assigned
#> 2 Assigned
#> 3 Assigned
#> 4 Assigned
#> 5 Assigned
#> 6 Assigned
#> antclassify_guild_notes
#> 1 <NA>
#> 2 <NA>
#> 3 <NA>
#> 4 <NA>
#> 5 <NA>
#> 6 Predacao e componente importante da ecologia conhecida; nao implica exclusividade alimentar.
#> antclassify_foraging_strategy antclassify_assignment_level
#> 1 <NA> genus
#> 2 <NA> genus
#> 3 <NA> genus
#> 4 <NA> genus
#> 5 <NA> genus
#> 6 <NA> genus
#> antclassify_guild_options antclassify_guild_is_ambiguous
#> 1 Fungus-g.... FALSE
#> 2 Generali.... TRUE
#> 3 Generali.... FALSE
#> 4 Fungus-g.... FALSE
#> 5 Fungus-g.... FALSE
#> 6 Generali.... FALSE
#> silva_guild
#> 1 Unidentified Guild
#> 2 Unidentified Guild
#> 3 Unidentified Guild
#> 4 Unidentified Guild
#> 5 Unidentified Guild
#> 6 Generalist predatory ectaheteromorphs
#> delabie_guild delabie_guild_candidates
#> 1 Attini (Fungus-growers) No alternative classification
#> 2 Omnivorous soil-and-litter species No alternative classification
#> 3 Omnivorous soil-and-litter species No alternative classification
#> 4 Attini (Fungus-growers) No alternative classification
#> 5 Attini (Fungus-growers) No alternative classification
#> 6 Large Ponerinae (Large epigeic predators) No alternative classification
#> silvestre_guild
#> 1 Unidentified Guild
#> 2 Generalist patrolling Camponotines
#> 3 Ambiguous classification: Crematogaster
#> 4 Cryptic fungus-growing ants (Attines)
#> 5 Cryptic fungus-growing ants (Attines)
#> 6 Large predators
#> silvestre_guild_candidates
#> 1 No alternative classification
#> 2 No alternative classification
#> 3 Dominant soil omnivores | Small arboreal species with massive recruitment
#> 4 No alternative classification
#> 5 No alternative classification
#> 6 No alternative classification
resultado$exotics
#> NULL
resultado$endemics
#> NULL
resultado$rarity
#> $table
#> species abundance assessed rarity_form percentage
#> 1 Brachymyrmex feitosai 7 TRUE Form 4 1.6055046
#> 2 Brachymyrmex micromegas 1 TRUE Form 7 0.2293578
#> 3 Camponotus atriceps 40 TRUE Form 2 9.1743119
#> 4 Camponotus tripartitus 1 TRUE Form 7 0.2293578
#> 5 Diaphoromyrma sofiae 1 TRUE Form 7 0.2293578
#> 6 Heteroponera inermis 2 TRUE Form 4 0.4587156
#> 7 Oxyepoecus browni 2 TRUE Form 6 0.4587156
#> 8 Oxyepoecus reticulatus 11 TRUE Form 1 2.5229358
#> 9 Pheidole aberrans 3 TRUE Form 2 0.6880734
#> 10 Pheidole fimbriata 3 TRUE Form 2 0.6880734
#> 11 Pheidole obscurithorax 2 TRUE Form 2 0.4587156
#> 12 Pheidole subarmata 2 TRUE Form 2 0.4587156
#> 13 Sphinctomyrmex stali 1 TRUE Form 6 0.2293578
#> 14 Strumigenys fridericimuelleri 2 TRUE Form 3 0.4587156
#> 15 Strumigenys sanctipauli 1 TRUE Form 6 0.2293578
#>
#> $plotAlthough antclassify() runs the full pipeline, users can
also apply each function separately depending on their research
goals.
guilds <- assign_guild_ants(dados, validate = FALSE, plot = FALSE)
#> Step 1: Preparing community data...
#> Step 2: Matching species to functional guilds...
#> Database (silva_db) version: 1.0.0
#> Database (delabie_db) version: 1.0.0
#> Database (silvestre_db) version: 1.0.0
#>
#> WARNING: Ambiguous functional guild classification detected.
#>
#> Some taxa could not be assigned to a single functional guild according to Silvestre et al. (2003).
#>
#> This ambiguity occurs because the original classification associates different species within the same genus with different functional guilds, reflecting differences in their ecological habits, foraging behavior, nesting strategies, and habitat use.
#>
#> Because identification was available only at the genus level, it was not possible to determine which guild best represents the taxa in the dataset.
#>
#> The taxa were therefore assigned to an 'Ambiguous classification' category, and the possible guilds were recorded in the results table. Abundance was not duplicated.
#>
#> Affected taxa and possible classifications:
#> species abundance silvestre_guild
#> 3 Crematogaster sp 35 Ambiguous classification: Crematogaster
#> 21 Camponotus fallatus 6 Ambiguous classification: Camponotus
#> 22 Camponotus hermanni 5 Ambiguous classification: Camponotus
#> 23 Camponotus xanthogaster 4 Ambiguous classification: Camponotus
#> 34 Camponotus tripartitus 1 Ambiguous classification: Camponotus
#> silvestre_guild_candidates
#> 3 Dominant soil omnivores | Small arboreal species with massive recruitment
#> 21 Soil and vegetation opportunists | Generalist patrolling Camponotines
#> 22 Soil and vegetation opportunists | Generalist patrolling Camponotines
#> 23 Soil and vegetation opportunists | Generalist patrolling Camponotines
#> 34 Soil and vegetation opportunists | Generalist patrolling Camponotines
#>
#> Guild classification results (first 6 rows):
#> species abundance percentage
#> 1 Atta sexdens 50 11.467890
#> 2 Camponotus atriceps 40 9.174312
#> 3 Crematogaster sp 35 8.027523
#> 4 Cyphomyrmex minutus 30 6.880734
#> 5 Cyphomyrmex rimosus 28 6.422018
#> 6 Ectatomma edentatum 25 5.733945
#> antclassify_guild
#> 1 Fungus-growers (soil or leaf litter nesting)
#> 2 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 3 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 4 Fungus-growers (soil or leaf litter nesting)
#> 5 Fungus-growers (soil or leaf litter nesting)
#> 6 Generalist predators (dominant, cryptic, epigeic, or arboreal)
#> antclassify_guild_status
#> 1 Assigned
#> 2 Assigned
#> 3 Assigned
#> 4 Assigned
#> 5 Assigned
#> 6 Assigned
#> antclassify_guild_notes
#> 1 <NA>
#> 2 <NA>
#> 3 <NA>
#> 4 <NA>
#> 5 <NA>
#> 6 Predacao e componente importante da ecologia conhecida; nao implica exclusividade alimentar.
#> antclassify_foraging_strategy antclassify_assignment_level
#> 1 <NA> genus
#> 2 <NA> genus
#> 3 <NA> genus
#> 4 <NA> genus
#> 5 <NA> genus
#> 6 <NA> genus
#> antclassify_guild_options antclassify_guild_is_ambiguous
#> 1 Fungus-g.... FALSE
#> 2 Generali.... TRUE
#> 3 Generali.... FALSE
#> 4 Fungus-g.... FALSE
#> 5 Fungus-g.... FALSE
#> 6 Generali.... FALSE
#> silva_guild
#> 1 Unidentified Guild
#> 2 Unidentified Guild
#> 3 Unidentified Guild
#> 4 Unidentified Guild
#> 5 Unidentified Guild
#> 6 Generalist predatory ectaheteromorphs
#> delabie_guild delabie_guild_candidates
#> 1 Attini (Fungus-growers) No alternative classification
#> 2 Omnivorous soil-and-litter species No alternative classification
#> 3 Omnivorous soil-and-litter species No alternative classification
#> 4 Attini (Fungus-growers) No alternative classification
#> 5 Attini (Fungus-growers) No alternative classification
#> 6 Large Ponerinae (Large epigeic predators) No alternative classification
#> silvestre_guild
#> 1 Unidentified Guild
#> 2 Generalist patrolling Camponotines
#> 3 Ambiguous classification: Crematogaster
#> 4 Cryptic fungus-growing ants (Attines)
#> 5 Cryptic fungus-growing ants (Attines)
#> 6 Large predators
#> silvestre_guild_candidates
#> 1 No alternative classification
#> 2 No alternative classification
#> 3 Dominant soil omnivores | Small arboreal species with massive recruitment
#> 4 No alternative classification
#> 5 No alternative classification
#> 6 No alternative classification
#> Step 3: Generating plots...
#>
#> Guild classification sources: Delabie et al. (2000), Silvestre et al. (2003),
#> Silva et al. (2015), and AntClassify internal database.
#> Full citations are available in the package documentation: ?assign_guild_ants
head(guilds$table)
#> species abundance percentage
#> 1 Atta sexdens 50 11.467890
#> 2 Camponotus atriceps 40 9.174312
#> 3 Crematogaster sp 35 8.027523
#> 4 Cyphomyrmex minutus 30 6.880734
#> 5 Cyphomyrmex rimosus 28 6.422018
#> 6 Ectatomma edentatum 25 5.733945
#> antclassify_guild
#> 1 Fungus-growers (soil or leaf litter nesting)
#> 2 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 3 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 4 Fungus-growers (soil or leaf litter nesting)
#> 5 Fungus-growers (soil or leaf litter nesting)
#> 6 Generalist predators (dominant, cryptic, epigeic, or arboreal)
#> antclassify_guild_status
#> 1 Assigned
#> 2 Assigned
#> 3 Assigned
#> 4 Assigned
#> 5 Assigned
#> 6 Assigned
#> antclassify_guild_notes
#> 1 <NA>
#> 2 <NA>
#> 3 <NA>
#> 4 <NA>
#> 5 <NA>
#> 6 Predacao e componente importante da ecologia conhecida; nao implica exclusividade alimentar.
#> antclassify_foraging_strategy antclassify_assignment_level
#> 1 <NA> genus
#> 2 <NA> genus
#> 3 <NA> genus
#> 4 <NA> genus
#> 5 <NA> genus
#> 6 <NA> genus
#> antclassify_guild_options antclassify_guild_is_ambiguous
#> 1 Fungus-g.... FALSE
#> 2 Generali.... TRUE
#> 3 Generali.... FALSE
#> 4 Fungus-g.... FALSE
#> 5 Fungus-g.... FALSE
#> 6 Generali.... FALSE
#> silva_guild
#> 1 Unidentified Guild
#> 2 Unidentified Guild
#> 3 Unidentified Guild
#> 4 Unidentified Guild
#> 5 Unidentified Guild
#> 6 Generalist predatory ectaheteromorphs
#> delabie_guild delabie_guild_candidates
#> 1 Attini (Fungus-growers) No alternative classification
#> 2 Omnivorous soil-and-litter species No alternative classification
#> 3 Omnivorous soil-and-litter species No alternative classification
#> 4 Attini (Fungus-growers) No alternative classification
#> 5 Attini (Fungus-growers) No alternative classification
#> 6 Large Ponerinae (Large epigeic predators) No alternative classification
#> silvestre_guild
#> 1 Unidentified Guild
#> 2 Generalist patrolling Camponotines
#> 3 Ambiguous classification: Crematogaster
#> 4 Cryptic fungus-growing ants (Attines)
#> 5 Cryptic fungus-growing ants (Attines)
#> 6 Large predators
#> silvestre_guild_candidates
#> 1 No alternative classification
#> 2 No alternative classification
#> 3 Dominant soil omnivores | Small arboreal species with massive recruitment
#> 4 No alternative classification
#> 5 No alternative classification
#> 6 No alternative classificationexotics <- check_exotic_ants(dados, validate = FALSE, plot = FALSE)
#> Step 1: Preparing community data...
#> Step 2: Generating results...
#> exotic_db version: 2.0.0
#>
#> ********************************************************************************
#> EXOTIC SPECIES DETECTED:
#> species origin
#> 1 Monomorium floricola Exotic
#> 2 Monomorium pharaonis Exotic
#> 3 Nylanderia fulva Exotic (native in some regions)
#> 4 Pheidole megacephala Exotic
#> 5 Strumigenys emmae Exotic
#> 6 Strumigenys rogeri Exotic
#> source abundance percentage
#> 1 Wong et al. 2023; Vieira 2025 18 4.128440
#> 2 Wong et al. 2023; Vieira 2025 17 3.899083
#> 3 Wong et al. 2023 13 2.981651
#> 4 Wong et al. 2023; Vieira 2025 16 3.669725
#> 5 Wong et al. 2023; Vieira 2025 15 3.440367
#> 6 Vieira 2025 14 3.211009
#>
#> DATA SOURCES:
#> Wong, M. K. L., Guénard, B., & Economo, E. P. (2023).
#> The global spread and invasion capacities of alien ants.
#> Current Biology, 33(3), 566-571.
#> Vieira, V. B. (2025). "Quem são e onde estão as formigas exóticas do Brasil?"
#> Master's thesis, Universidade Federal do Paraná, Curitiba, Brazil.
#> Full references available in the package documentation: ?check_exotic_ants
#> ********************************************************************************
exotics
#> $table
#> species abundance percentage source
#> 1 Monomorium floricola 18 4.128440 Wong et al. 2023; Vieira 2025
#> 2 Monomorium pharaonis 17 3.899083 Wong et al. 2023; Vieira 2025
#> 3 Nylanderia fulva 13 2.981651 Wong et al. 2023
#> 4 Pheidole megacephala 16 3.669725 Wong et al. 2023; Vieira 2025
#> 5 Strumigenys emmae 15 3.440367 Wong et al. 2023; Vieira 2025
#> 6 Strumigenys rogeri 14 3.211009 Vieira 2025
#> native_in_some_brazil_regions is_exotic origin
#> 1 FALSE TRUE Exotic
#> 2 FALSE TRUE Exotic
#> 3 TRUE TRUE Exotic (native in some regions)
#> 4 FALSE TRUE Exotic
#> 5 FALSE TRUE Exotic
#> 6 FALSE TRUE Exotic
#>
#> $plotendemics <- check_endemic_atlantic_ants(dados, validate = FALSE, plot = FALSE)
#>
#> **********************************************************************************
#> ATTENTION: This function identifies endemic species of the BRAZILIAN ATLANTIC FOREST.
#> If your data collection did not occur within this biome, this analysis may not
#> be appropriate for your study.
#> **********************************************************************************
#> Step 1: Preparing community data...
#> Step 2: Generating results...
#> endemic_db version: 1.0.0
#>
#> ********************************************************************************
#> ENDEMIC SPECIES DETECTED (ATLANTIC FOREST):
#> species abundance percentage
#> 1 Apterostigma serratum 9 2.064220
#> 2 Brachymyrmex delabiei 8 1.834862
#> 3 Brachymyrmex feitosai 7 1.605505
#> 4 Camponotus fallatus 6 1.376147
#> 5 Camponotus hermanni 5 1.146789
#>
#> DATA SOURCE:
#> Silva, N. S., Goncalves, D. C. de O., Wazema, C. T., Barbosa, D. A., Prado, L. P. do,
#> Andrade-Silva, J., Fernandes, T. T., Silva, R. R., & Morini, M. S. de C. (2025).
#> 'Endemism and vulnerability of ants in the phytophysiognomies of the Brazilian
#> Atlantic Forest'. In: Brazilian Myrmecology: Exploring the World's Richest Ant Fauna
#> (Chapter 16). Editora Cientifica Digital. DOI: 10.37885/250920259.
#> Full reference available in the package documentation: ?check_endemic_atlantic_ants
#> ********************************************************************************
endemics
#> $table
#> species abundance percentage status
#> 1 Apterostigma serratum 9 2.064220 Endemic (AF)
#> 2 Brachymyrmex delabiei 8 1.834862 Endemic (AF)
#> 3 Brachymyrmex feitosai 7 1.605505 Endemic (AF)
#> 4 Camponotus fallatus 6 1.376147 Endemic (AF)
#> 5 Camponotus hermanni 5 1.146789 Endemic (AF)
#>
#> $plotrarity <- check_rarity_atlantic_ants(dados, validate = FALSE, plot = FALSE)
#>
#> ********************************************************************************
#> ATTENTION:
#> This function identifies rare ant species and their rarity forms.
#> This classification is specific to the Brazilian Atlantic Forest and
#> may not be appropriate for other biomes.
#> ********************************************************************************
#> Step 1: Preparing community data and rarity database...
#> Rarity database (rarity_db) version: 2.0.0
#> Step 2: Generating results...
#>
#> ********************************************************************************
#> RARE SPECIES DETECTED:
#> species rarity_form abundance percentage
#> 1 Brachymyrmex feitosai Form 4 7 1.6055046
#> 2 Brachymyrmex micromegas Form 7 1 0.2293578
#> 3 Camponotus atriceps Form 2 40 9.1743119
#> 4 Camponotus tripartitus Form 7 1 0.2293578
#> 5 Diaphoromyrma sofiae Form 7 1 0.2293578
#> 6 Heteroponera inermis Form 4 2 0.4587156
#> 7 Oxyepoecus browni Form 6 2 0.4587156
#> 8 Oxyepoecus reticulatus Form 1 11 2.5229358
#> 9 Pheidole aberrans Form 2 3 0.6880734
#> 10 Pheidole fimbriata Form 2 3 0.6880734
#> 11 Pheidole obscurithorax Form 2 2 0.4587156
#> 12 Pheidole subarmata Form 2 2 0.4587156
#> 13 Sphinctomyrmex stali Form 6 1 0.2293578
#> 14 Strumigenys fridericimuelleri Form 3 2 0.4587156
#> 15 Strumigenys sanctipauli Form 6 1 0.2293578
#>
#> NOTE: 20 species were NOT assessed (not in the Atlantic Forest rarity database).
#> These are UNASSESSED, not "common". They are absent from rarity_db,
#> so no rarity form can be assigned to them here.
#> Unassessed species: Apterostigma serratum, Atta sexdens, Brachymyrmex delabiei, Camponotus fallatus, Camponotus hermanni, Camponotus xanthogaster, Crematogaster sp, Cyphomyrmex minutus, Cyphomyrmex rimosus, Ectatomma edentatum, Heteroponera mayri, Holcoponera striatula, Monomorium floricola, Monomorium pharaonis, Nylanderia fulva, Odontomachus chelifer, Pachycondyla striata, Pheidole megacephala, Strumigenys emmae, Strumigenys rogeri
#>
#> DATA SOURCE AND REFERENCE:
#> Silva, N. S., Maciel, E. A., Prado, L. P., Silva, O. G., Barbosa, D. A.,
#> Andrade-Silva, J., ... & Morini, M. S. (2024).
#> 'Ant rarity and vulnerability in Brazilian Atlantic Forest fragments.'
#> Biological Conservation, 296, 110640. https://doi.org/10.1016/j.biocon.2024.110640
#> ********************************************************************************
rarity
#> $table
#> species abundance assessed rarity_form percentage
#> 1 Brachymyrmex feitosai 7 TRUE Form 4 1.6055046
#> 2 Brachymyrmex micromegas 1 TRUE Form 7 0.2293578
#> 3 Camponotus atriceps 40 TRUE Form 2 9.1743119
#> 4 Camponotus tripartitus 1 TRUE Form 7 0.2293578
#> 5 Diaphoromyrma sofiae 1 TRUE Form 7 0.2293578
#> 6 Heteroponera inermis 2 TRUE Form 4 0.4587156
#> 7 Oxyepoecus browni 2 TRUE Form 6 0.4587156
#> 8 Oxyepoecus reticulatus 11 TRUE Form 1 2.5229358
#> 9 Pheidole aberrans 3 TRUE Form 2 0.6880734
#> 10 Pheidole fimbriata 3 TRUE Form 2 0.6880734
#> 11 Pheidole obscurithorax 2 TRUE Form 2 0.4587156
#> 12 Pheidole subarmata 2 TRUE Form 2 0.4587156
#> 13 Sphinctomyrmex stali 1 TRUE Form 6 0.2293578
#> 14 Strumigenys fridericimuelleri 2 TRUE Form 3 0.4587156
#> 15 Strumigenys sanctipauli 1 TRUE Form 6 0.2293578
#>
#> $plot##Multi‑site analysis with antclassify_community
When the study involves several sampling units, the function antclassify_community() applies the full classification pipeline to each row of a community matrix and returns aggregated site‑by‑guild information. This avoids manual loops and ensures consistent classification across all sites.
The package includes a small built‑in dataset, ant_community, that can be used to test this function.
data(ant_community)
# Run the pipeline on the built‑in dataset
res_com <- antclassify_community(ant_community, guild_col = "antclassify_guild",
validate = FALSE)
#> Step 1: Preparing community data...
#> Step 2: Matching species to functional guilds...
#> Database (silva_db) version: 1.0.0
#> Database (delabie_db) version: 1.0.0
#> Database (silvestre_db) version: 1.0.0
#>
#> ------------------------------------------
#> Genus: Solenopsis
#> Affected taxa: Solenopsis saevissima
#>
#> Possible classifications:
#> 1 - Guild 1 - Litter omnivores and scavengers
#> 2 - Guild 8B - Soil/litter omnivores
#> Solenopsis kept as 'Ambiguous classification' (interactive disabled).
#>
#> Guild classification results (first 6 rows):
#> species abundance percentage
#> 1 Atta sexdens 10 50
#> 2 Camponotus atriceps 3 15
#> 3 Pheidole megacephala 2 10
#> 4 Solenopsis saevissima 1 5
#> 5 Nylanderia fulva 4 20
#> antclassify_guild
#> 1 Fungus-growers (soil or leaf litter nesting)
#> 2 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 3 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 4 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 5 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> antclassify_guild_status
#> 1 Assigned
#> 2 Assigned
#> 3 Assigned
#> 4 Assigned
#> 5 Assigned
#> antclassify_guild_notes
#> 1 <NA>
#> 2 <NA>
#> 3 <NA>
#> 4 Includes fire ants (e.g., S. saevissima, S. invicta) which are generalist, often dominant omnivores and scavengers, not specialist cryptic predators. Some species are predatory, but the genus is predominantly omnivorous.
#> 5 <NA>
#> antclassify_foraging_strategy antclassify_assignment_level
#> 1 <NA> genus
#> 2 <NA> genus
#> 3 <NA> genus
#> 4 <NA> genus
#> 5 <NA> genus
#> antclassify_guild_options antclassify_guild_is_ambiguous silva_guild
#> 1 Fungus-g.... FALSE Unidentified Guild
#> 2 Generali.... TRUE Unidentified Guild
#> 3 Generali.... TRUE Unidentified Guild
#> 4 Generali.... TRUE Unidentified Guild
#> 5 Generali.... FALSE Unidentified Guild
#> delabie_guild
#> 1 Attini (Fungus-growers)
#> 2 Omnivorous soil-and-litter species
#> 3 Omnivorous soil-and-litter species
#> 4 Ambiguous classification: Solenopsis
#> 5 Unidentified Guild
#> delabie_guild_candidates
#> 1 No alternative classification
#> 2 No alternative classification
#> 3 No alternative classification
#> 4 Guild 1 - Litter omnivores and scavengers | Guild 8B - Soil/litter omnivores
#> 5 No alternative classification
#> silvestre_guild silvestre_guild_candidates
#> 1 Unidentified Guild No alternative classification
#> 2 Generalist patrolling Camponotines No alternative classification
#> 3 Dominant soil omnivores No alternative classification
#> 4 Dominant soil omnivores No alternative classification
#> 5 Unidentified Guild No alternative classification
#> Step 3: Generating plots...
#>
#> Guild classification sources: Delabie et al. (2000), Silvestre et al. (2003),
#> Silva et al. (2015), and AntClassify internal database.
#> Full citations are available in the package documentation: ?assign_guild_ants
#> Step 1: Preparing community data...
#> Step 2: Matching species to functional guilds...
#> Database (silva_db) version: 1.0.0
#> Database (delabie_db) version: 1.0.0
#> Database (silvestre_db) version: 1.0.0
#>
#> Guild classification results (first 6 rows):
#> species abundance percentage
#> 1 Atta sexdens 5 41.666667
#> 2 Pheidole megacephala 4 33.333333
#> 3 Wasmannia auropunctata 2 16.666667
#> 4 Nylanderia fulva 1 8.333333
#> antclassify_guild
#> 1 Fungus-growers (soil or leaf litter nesting)
#> 2 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 3 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 4 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> antclassify_guild_status
#> 1 Assigned
#> 2 Assigned
#> 3 Assigned
#> 4 Assigned
#> antclassify_guild_notes
#> 1 <NA>
#> 2 <NA>
#> 3 Generalist omnivores, often dominant in disturbed habitats. W. auropunctata is a widespread invasive species with broad diet and aggressive behavior.
#> 4 <NA>
#> antclassify_foraging_strategy antclassify_assignment_level
#> 1 <NA> genus
#> 2 <NA> genus
#> 3 <NA> genus
#> 4 <NA> genus
#> antclassify_guild_options antclassify_guild_is_ambiguous silva_guild
#> 1 Fungus-g.... FALSE Unidentified Guild
#> 2 Generali.... TRUE Unidentified Guild
#> 3 Generali.... FALSE Unidentified Guild
#> 4 Generali.... FALSE Unidentified Guild
#> delabie_guild delabie_guild_candidates
#> 1 Attini (Fungus-growers) No alternative classification
#> 2 Omnivorous soil-and-litter species No alternative classification
#> 3 Omnivorous soil-and-litter species No alternative classification
#> 4 Unidentified Guild No alternative classification
#> silvestre_guild silvestre_guild_candidates
#> 1 Unidentified Guild No alternative classification
#> 2 Dominant soil omnivores No alternative classification
#> 3 Small arboreal species with massive recruitment No alternative classification
#> 4 Unidentified Guild No alternative classification
#> Step 3: Generating plots...
#>
#> Guild classification sources: Delabie et al. (2000), Silvestre et al. (2003),
#> Silva et al. (2015), and AntClassify internal database.
#> Full citations are available in the package documentation: ?assign_guild_ants
#> Step 1: Preparing community data...
#> Step 2: Matching species to functional guilds...
#> Database (silva_db) version: 1.0.0
#> Database (delabie_db) version: 1.0.0
#> Database (silvestre_db) version: 1.0.0
#>
#> ------------------------------------------
#> Genus: Solenopsis
#> Affected taxa: Solenopsis saevissima
#>
#> Possible classifications:
#> 1 - Guild 1 - Litter omnivores and scavengers
#> 2 - Guild 8B - Soil/litter omnivores
#> Solenopsis kept as 'Ambiguous classification' (interactive disabled).
#>
#> Guild classification results (first 6 rows):
#> species abundance percentage
#> 1 Camponotus atriceps 2 18.181818
#> 2 Pheidole megacephala 1 9.090909
#> 3 Wasmannia auropunctata 3 27.272727
#> 4 Solenopsis saevissima 5 45.454545
#> antclassify_guild
#> 1 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 2 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 3 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> 4 Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> antclassify_guild_status
#> 1 Assigned
#> 2 Assigned
#> 3 Assigned
#> 4 Assigned
#> antclassify_guild_notes
#> 1 <NA>
#> 2 <NA>
#> 3 Generalist omnivores, often dominant in disturbed habitats. W. auropunctata is a widespread invasive species with broad diet and aggressive behavior.
#> 4 Includes fire ants (e.g., S. saevissima, S. invicta) which are generalist, often dominant omnivores and scavengers, not specialist cryptic predators. Some species are predatory, but the genus is predominantly omnivorous.
#> antclassify_foraging_strategy antclassify_assignment_level
#> 1 <NA> genus
#> 2 <NA> genus
#> 3 <NA> genus
#> 4 <NA> genus
#> antclassify_guild_options antclassify_guild_is_ambiguous silva_guild
#> 1 Generali.... TRUE Unidentified Guild
#> 2 Generali.... TRUE Unidentified Guild
#> 3 Generali.... FALSE Unidentified Guild
#> 4 Generali.... TRUE Unidentified Guild
#> delabie_guild
#> 1 Omnivorous soil-and-litter species
#> 2 Omnivorous soil-and-litter species
#> 3 Omnivorous soil-and-litter species
#> 4 Ambiguous classification: Solenopsis
#> delabie_guild_candidates
#> 1 No alternative classification
#> 2 No alternative classification
#> 3 No alternative classification
#> 4 Guild 1 - Litter omnivores and scavengers | Guild 8B - Soil/litter omnivores
#> silvestre_guild silvestre_guild_candidates
#> 1 Generalist patrolling Camponotines No alternative classification
#> 2 Dominant soil omnivores No alternative classification
#> 3 Small arboreal species with massive recruitment No alternative classification
#> 4 Dominant soil omnivores No alternative classification
#> Step 3: Generating plots...
#>
#> Guild classification sources: Delabie et al. (2000), Silvestre et al. (2003),
#> Silva et al. (2015), and AntClassify internal database.
#> Full citations are available in the package documentation: ?assign_guild_ants
# Abundance matrix (sites × guilds)
res_com$guild_abundance
#> Fungus-growers (soil or leaf litter nesting)
#> Site1 10
#> Site2 5
#> Site3 0
#> Generalist omnivores (dominant or opportunistic in soil, leaf litter, or arboreal)
#> Site1 10
#> Site2 7
#> Site3 11
# Guild richness per site
res_com$guild_richness
#> [1] 2 2 1The package expects a community matrix where:
Rows represent sampling units (or a single community)
Columns represent species
Values represent abundance (or presence/absence)
Species names must be provided as column names..
The built‑in dataset ant_community demonstrates the expected format:
The AntClassify package provides a flexible workflow that can be used either as a fully automated pipeline or through modular functions, allowing users to adapt analyses to different ecological questions.
By integrating functional classification, invasion biology, endemism, and rarity into a single framework, the package enhances reproducibility and facilitates ecological interpretation of ant communities.