remove_base_spp_abundances_from_wrapping_distribution: Remove base problem's species from the wrapping problems set...

remove_base_spp_abundances_from_wrapping_distributionR Documentation

Remove base problem's species from the wrapping problems set of species to be distributed over the planning units

Description

When wrapping one distribution around another, the outside distribution needs to contain the inside distribution as a proper subset, however, when it's time to distribute the wrapping distribution over the landscape, the inside distribution has already been distributed. That means that the inside distribution needs to be removed from full wrapping distribution before its instances are spread across the landscape. This function strips that inside distribution out of the full wrapped distribution and returns a set of abundances ready for spreading.

Usage

remove_base_spp_abundances_from_wrapping_distribution(
  Xu_PU_spp_table,
  trimmed_rounded_abund_per_spp,
  spp_col_name,
  allow_imperfect_wrap
)

Arguments

Xu_PU_spp_table

PU_spp table for original Xu problem being wrapped around

trimmed_rounded_abund_per_spp

vector of abundances of all species in the full wrapped distribution, i.e., including the original Xu problem abundances

spp_col_name

string containing the name of the column in the PU_spp table that contains the species IDs

allow_imperfect_wrap

boolean indicating whether the wrapping distribution needs to fully contain the base distribution; TRUE implies it must fully contain the base distribution and FALSE implies it need not fully contain the base distribution

Value

vector of abundances in the wrapping abundance distribution that are not also in the original Xu problem


langfob/bdpg documentation built on Dec. 8, 2022, 5:33 a.m.