BiologicalRecordsCentre / sparta

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

`jul_date` `modeltype` not working #248

Closed 03rcooke closed 1 month ago

03rcooke commented 1 year ago

It looks like the code to run the jul_date modeltype is not working. If you debug occDetFunc it adds JulDate to bugs_data but it is an empty numeric so the model doesn't run.

drnickisaac commented 1 year ago

Could you provide a quite reprex?

drnickisaac commented 1 year ago

Ok, I have taken a quick look. It works fine for me. Did you include includeJDay=TRUE in your call to formatOccData?

03rcooke commented 1 year ago

Ah okay, I didn't realise you needed an argument in formatOccData. We were just looping through the different modeltypes and I thought it would strip out the julian date from the data automatically. I think we should add a note to the documentation that refers the user to the formatOccData help file for the julian date modeltype and we can have an informative error for if there's no julian date column in the data.

03rcooke commented 1 year ago

I think I've fixed this in my fork, in my nimble branch. Now returns an error if Jul_date column is not included

DylanCarbone commented 1 month ago

Hi @03rcooke,

Do you remember if you pushed your fixes to this issue? I cannot see any changes to the occDetFunc function in your branch of sparta.

I think I've fixed this in my fork, in my nimble branch. Now returns an error if Jul_date column is not included

Thanks