Closed drnickisaac closed 3 years ago
Problem is here:
https://github.com/BiologicalRecordsCentre/sparta/blob/6c8c993887523545cb13f6f878d0e7c70f149a6a/R/occDetFunc.r#L473
nrow(occDetdata) = nvisit
This is a BIG issue?! I guess all recent model runs will need to re-run?
@mlogie
If affects the most recent Mayflies and the tail end of the Caddis run last week.
ok, fixed it
First:
regional_codes <- merge(regional_codes, site_match, by.y="name", by.x="site")
then
bugs_data[paste0('r_', region)] <- list(regional_codes[order(regional_codes$id), region])
Can you do a PR then we can kick the models off again
Yup. I am running the Tests locally now.
Fixed some fails introduced by other tinkering (to be documented in PR). Now ready to go. This issue can be closed once the PR is accepted (I forget how to do this).
This is interesting to read. I had some problems with regional outputs at the end of last week - for some regions (but not others) I was getting only zeros in psi.fs.r* - these regions had worked fine previously. Might this be related?
Could be. Do you know what version you were using? This bug effected .11 and .12
Hey Tom - not sure. I'm a bit of a Github newby - where can I find the version # ? (I'm sure it is somewhere obvious, but can't find it). After a few snags with the testthat package in devtools, I have just reinstalled Sparta and trying again with the regions.
sessionInfo()
will print out the packages you have loaded and their versions
Thanks Tom. I ran everything last night with .14 and it all worked smoothly.
Fantastic, sorry if our bug got in your way!
Region identifiers are
length(nvisit)
but should belength(nsite)
This has crept intooccDetFunc
in the most recent version (0.2.11-0.2.12). I am fixing it now. It means that region-level occupancy results cannot be trusted.