BiologicalRecordsCentre / sparta

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

Occupancy models error when no species records #177

Open JHHatfield opened 4 years ago

JHHatfield commented 4 years ago

I added an error to stop the occupancy models running when there are no species records left after the nyr filter. This is good when running locally but may cause issues if failed species are automatically re-run.

See lines 398 -399 in occDetFunc.r

drnickisaac commented 3 years ago

I have elaborated on this: the skip is part of criterion. At present it does not run the occupancy model if the criterion is tripped (including zero records) but out is still returned with metadata but not model. This could cause downstream problems for TrendSummaries but might be desirable. What do you think, @mlogie @robboyd ?