NEON-biodiversity / Ostats

O-statistics (community pairwise niche overlap statistics)

Home Page:https://neon-biodiversity.github.io/Ostats/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

overlap calculated separately for >1 trait

qdread opened this issue · comments

The Ostats() function now rejects input with >1 trait (line 106). However if you look at line 151, you can see that actually it should loop through the traits and calculate a separate overlap for each trait.

We need to get rid of that error catching line because we don't want it to return an error if there is >1 trait. We want it to either calculate a separate overlap for each trait, or ultimately also implement the hypervolume overlap for >1 trait. See #14 for more on hypervolumes.

I just noticed that the community_overlap_merged() function is written so that it currently returns an error if there is >1 trait due to the way the data structures are set up. This function will also need to be rewritten to support the multiple traits (not just for the hypervolumes but also just to be able to loop through >1 trait).

I resolved these issues in the set of commits I merged from hypervolume test branch into master branch: 866db1d