trim_abundances | R Documentation |
This function is primarily to get rid of species that occur on only 0 or 1 patches, however, some distribution generator might also generate species that are too common as well, so this routine will axe those too.
trim_abundances( rounded_abundances, min_abund = 2, max_abund = .Machine$double.xmax )
rounded_abundances |
vector of abundances to be trimmed |
min_abund |
lowest abundance to allow in the trimmed set |
max_abund |
largest abundance to allow in the trimmed set |
Abundances are expressed here as a vector of count values where each value is the count of the number of patches a particular species occurs on. For example, [1 1 1 2 6 6] would represent 3 species that occur on exactly one patch, 1 species that occurs on 2 patches, and 2 species that occur on 6 patches each. Calling this routine with a min_abund of 2 and a max_abund of 5 would return a 1 element vector, i.e., the vector [2].
This doesn't really need to be a function since it's only one line long, but I built an earlier version that was more verbose so that I could monitor how many things were being cut out. That version is in the git repository in case it needs to be resurrected for some reason.
vector of abundances whose values lie in the specified range
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.