BiologicalRecordsCentre / sparta

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

Fixing the drop of first years only #228

Closed mlogie closed 3 years ago

mlogie commented 3 years ago

There is a situation where occDetFunc fails but shouldn't. If you have data running from 1970-2020 say, and all data from the first year fails the repeat site (or other) checks, but no other years are dropped entirely, you end up with contiguous data from 1971-2020. This should in theory still run. However, it does not, as min_year is calculated before sites are dropped. This fix recalculates min_year after dropping data and gives a warning if the min_year has changed, but still runs the models.

mlogie commented 3 years ago

Fixed the additional min_year bug

mlogie commented 3 years ago

Now adding commits for removing aggregates where some regions are missing. This is not always desired behaviour, and can now be changed, but is still the default.

AugustT commented 3 years ago

@mlogie because you have updated the roxygen tags at the top of the function you need to 'document' the package so that the manual is updated. You can do this in RStudio with 'Ctrl+Shift+D'. You should then see a new version of the manual file to commit