Scatterplot of total abundance (per species) versus site occupancy (number of quadrats in which the species occurs) with both axes on a log scale. Adds an optional least-squares trend line for visual guidance.
Arguments
- oa_data
A data frame as returned by
calculate_occupancy_abundance
with columnsSpecies
,TotalAbundance
(non-negative numeric), andOccupancy
(non-negative integer).
Details
If the input contains no observations (or all totals are zero), a minimal placeholder plot is returned indicating that there is nothing to draw. Otherwise both axes are shown on base-10 logarithmic scales.
Examples
if (FALSE) { # \dontrun{
oa <- calculate_occupancy_abundance(abund_matrix)
plot_occupancy_abundance(oa)
} # }