Eliminate redundancy in community_overlap_merged
qdread opened this issue · 4 comments
the code is very slow at the moment because it calculates the density for each species every time a pairwise overlap is calculated. If there are a lot of species that means the same density is estimated many times. Need to rewrite. See comment in the other issue this is spawned from (#19 )
This is being worked on in branch no-redundancy
. After testing, we may need to update documentation for the modified function pairwise_overlap
and the new function trait_density
, though we also may not want to export either of them.
The changes I made also broke the function Ostats_regional()
. However this function may not be needed anymore.
Two new issues:
- the progress bars are now mismatched with the actual progress so they go from 0-100 in one step.
- the testthat tests are broken because the results are numerically slightly different. Not sure if this is OK or a problem, but either way tests will have to be fixed.
I was able to fix the issue with the testthat tests --- in fact it illustrated the usefulness of having those tests because it made it a lot easier to see that there were bugs in the new code and to fix them! 😀