BiologicalRecordsCentre / sparta

Species Presence/Absence R Trends Analyses
http://biologicalrecordscentre.github.io/sparta/index.html
MIT License
21 stars 24 forks source link

Added an argument `allowSitesMultiRegions` & bug fixes #236

Closed drnickisaac closed 3 years ago

drnickisaac commented 3 years ago

-Added an argument allowSitesMultiRegions to change behaviour of regions (default is no change from current behaviour)

In addition, some bug fixes to occDetFunc: -fixed two typos in the definition of n_species_sites in occDetFunc (line 724) -Fixed bug in calculation of regions_sites. This information is already stored in bugs_data, so the statement on line 560 was both erroneous and superfluous. -Streamlined presentation of metadata -test on line 307 (for duplicate sites in regional_codes) now more robust to how regional_codes has been constructed (e.g. if site is not the first column). -fixed error on line 315 where bad_sites was called before having been defined. Also made the error message on line 315 more informative -Further edits to the checks to permit situations where “site” is not the first column. -removed references to bugs_data_copy where simply using bugs_data will suffice -Updated the documentation to reflect recent changes -Updates occDetModel to be consistent with changes to occDetFunc

codecov-commenter commented 3 years ago

Codecov Report

Merging #236 (11756ef) into master (14919c1) will increase coverage by 0.09%. The diff coverage is 90.90%.

:exclamation: Current head 11756ef differs from pull request most recent head c214903. Consider uploading reports for the commit c214903 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
+ Coverage   39.11%   39.20%   +0.09%     
==========================================
  Files          86       86              
  Lines        2861     2867       +6     
==========================================
+ Hits         1119     1124       +5     
- Misses       1742     1743       +1     
Impacted Files Coverage Δ
R/occDetFunc.r 76.47% <90.00%> (-0.02%) :arrow_down:
R/occDetModel.r 90.69% <100.00%> (+0.45%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 14919c1...c214903. Read the comment docs.

drnickisaac commented 3 years ago

Thanks both. I've corrected the order of the lines and changed the wording to Rob's suggestion. Updated PR on it's way.