check_for_imperfect_wrap | R Documentation |
When wrapping a species distribution around a Xu biodiversity problem, the optimizer may have stopped before finding a distribution that fully encloses the base distribution, i.e., the wrapping distribution has fewer species that occur on exactly 2 patches than the base distribution has. In that case, the freq entry in the wrapping abundance distribution will be negative. If the allow_imperfect_wrap flag is set to TRUE, then set that histogram value to be 0 instead of the negative value, otherwise, it's a fatal error and the program should stop.
check_for_imperfect_wrap( final_wrapped_extra_spp_abund_hist, allow_imperfect_wrap )
final_wrapped_extra_spp_abund_hist |
data frame showing the number of species to be added for each occurrence count, e.g., how many new species to add that occur on exactly 2 patches, exactly 3 patches, etc. |
allow_imperfect_wrap |
boolean indicating whether the proposed wrapping distribution is allowed to not fully enclose the base distribution |
Note that the reason the value gets set to 0 instead of to the number of species on 2 patches in the base distribution is that the histogram is representing the total number of Extra species to be added that occur on exactly 2 patches rather than the total number of species occurring on 2 patches in the entire combined distribution.
list containing the final wrapping abundance histogram and a boolean flag indicating whether the wrap is imperfect or not
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.