check_rarity_atlantic_ants: Identify Ant Rarity Forms (Atlantic Forest)

View source: R/check_rarity_atlantic_ants.R

check_rarity_atlantic_antsR Documentation

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,
  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 of rarity form abundance proportions. "species" shows a bar plot of individual rare species abundances as a proportion of the total community, colored by rarity form.

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 rare species detected, with columns species, rarity_form, abundance, and percentage.

plot

A ggplot2 object.


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