poissonconsulting / ypr

An R package of equilibrium-based yield per recruit methods
https://poissonconsulting.github.io/ypr/
Other
7 stars 1 forks source link

ypr_populations() errors if only one population defined #33

Closed joethorley closed 5 years ago

joethorley commented 5 years ago
ypr_populations(tmax = 20:21)
ypr_populations(tmax = 20L)
joethorley commented 5 years ago
> ypr_populations(tmax = 20:21)
tmax: 20, 21
k:    0.15
Linf: 100
t0:   0
Wb:   3
Ls:   50
Sp:   100
es:   1
Sm:   0
fb:   1
tR:   1
BH:   1
Rk:   3
M:    0.2
Mb:   0
Lv:   50
Vp:   100
Llo:  0
Lup:  1000
Nc:   0
pi:   0.2
rho:  0
Hm:   0
Rmax: 1
A0:   0
Wa:   0.01
fa:   1
q:    0.1
> ypr_populations(tmax = 20L)
Error in apply(x, 2, function(x, names) paste0(names, "_", x), names = names) : 
  dim(X) must have a positive length
joethorley commented 5 years ago

done