check_endemic_atlantic_ants: Identify Endemic Ant Species (Atlantic Forest)

View source: R/check_endemic_atlantic_ants.R

check_endemic_atlantic_antsR Documentation

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,
  plot_type = c("status", "species"),
  validate = TRUE,
  delay = 0.5
)

Arguments

comm

A community matrix where species are columns and samples are rows.

verbose

Logical; if TRUE, displays progress messages.

plot

Logical; if TRUE, displays a plot (type controlled by plot_type).

plot_type

Character; type of plot to display. "status" (default) shows a bar plot comparing endemic vs. other species abundance proportions. "species" shows a bar plot of individual endemic species abundances as a proportion of the total community.

validate

Logical; if TRUE, validates species names using GBIF before analysis.

delay

Numeric; seconds to wait between GBIF API calls when validate = TRUE.

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.


AntClassify documentation built on Sept. 4, 2026, 1:06 a.m.