You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with mizer's North Sea multispecies model, particularly estimating yields under different fishing pressure. The getYield() function has been working fine for this (in many scripts since June, no problems), but now gives this error:
getYield(sim2)
sp
time Sprat Sandeel N.pout Herring Dab Whiting Sole Gurnard Plaice
sp
time Haddock Cod Saithe
Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
5: In sweep(f_gear, c(1, 3, 4), biomass, "*") :
STATS is longer than the extent of 'dim(x)[MARGIN]'
James, thank you very much for this useful bug report. The issue arises because the new code assumed that the dimensions of the effort array are called "time" and "gear", but the code does not ensure that these dimensions are named correctly. I have now fixed that. You can get the fixed version with
remotes::install_github("sizespectrum/mizer")
Alternatively, you can assign names to the effort array dimensions by hand:
I've been playing around with mizer's North Sea multispecies model, particularly estimating yields under different fishing pressure. The getYield() function has been working fine for this (in many scripts since June, no problems), but now gives this error:
The error now appears running the simple North Sea example at https://sizespectrum.org/mizer/articles/a_multispecies_model_of_the_north_sea.html. Using the NS_params in your data folder, I'm running:
getYield()
works if you run the simulation with effort = 0. Could be a bug from a recent update on how effort is defined?Thanks for all your work on this package, it's fantastic and easy to use.
The text was updated successfully, but these errors were encountered: