These functions create labels from FLSR models and params to be used, for example, on the legend of the ggplot-based plot method for FLSRs

eqlabel(model, param)

modlabel(model, param)

Arguments

model

a list of model formulas

param

a list of FLPar objects for the params slot

Examples

 data(nsher)
 srs <- FLSRs(sapply(c('ricker', 'bevholt'), function(x) {
   y <- nsher
   model(y) <- x
   return(fmle(y))
 }))
#>   Nelder-Mead direct search function minimizer
#> function value for initial parameters = -15.862252
#>   Scaled convergence tolerance is 2.36366e-07
#> Stepsize computed as 11.939303
#> BUILD              3 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 -15.862252
#> SHRINK             7 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 -15.862252
#> HI-REDUCTION       9 267.632807 -15.862252
#> HI-REDUCTION      11 236.438352 -15.862252
#> HI-REDUCTION      13 205.241529 -15.862252
#> HI-REDUCTION      15 174.041331 -15.862252
#> HI-REDUCTION      17 142.839861 -15.862252
#> HI-REDUCTION      19 111.657775 -15.862252
#> HI-REDUCTION      21 80.601711 -15.862252
#> HI-REDUCTION      23 50.133420 -15.862252
#> HI-REDUCTION      25 21.954719 -15.862252
#> HI-REDUCTION      27 0.340450 -15.862252
#> HI-REDUCTION      29 -10.920787 -15.862252
#> HI-REDUCTION      31 -14.696800 -15.862252
#> HI-REDUCTION      33 -15.639120 -15.862252
#> HI-REDUCTION      35 -15.676851 -15.862252
#> HI-REDUCTION      37 -15.816477 -15.862252
#> HI-REDUCTION      39 -15.825739 -15.862252
#> LO-REDUCTION      41 -15.847989 -15.862252
#> LO-REDUCTION      43 -15.852490 -15.862252
#> LO-REDUCTION      45 -15.857566 -15.862252
#> LO-REDUCTION      47 -15.860412 -15.862252
#> LO-REDUCTION      49 -15.861062 -15.862252
#> LO-REDUCTION      51 -15.861647 -15.862252
#> LO-REDUCTION      53 -15.862025 -15.862252
#> LO-REDUCTION      55 -15.862108 -15.862252
#> LO-REDUCTION      57 -15.862175 -15.862252
#> LO-REDUCTION      59 -15.862224 -15.862252
#> LO-REDUCTION      61 -15.862235 -15.862252
#> LO-REDUCTION      63 -15.862243 -15.862252
#> LO-REDUCTION      65 -15.862249 -15.862252
#> LO-REDUCTION      67 -15.862250 -15.862252
#> LO-REDUCTION      69 -15.862251 -15.862252
#> LO-REDUCTION      71 -15.862252 -15.862252
#> LO-REDUCTION      73 -15.862252 -15.862252
#> Exiting from Nelder Mead minimizer
#>     75 function evaluations used
#>   Nelder-Mead direct search function minimizer
#> function value for initial parameters = -10.336211
#>   Scaled convergence tolerance is 1.54022e-07
#> Stepsize computed as 501.110000
#> BUILD              3 44.842344 -11.603908
#> Warning: NaNs produced
#> HI-REDUCTION       5 31.685209 -11.603908
#> Warning: NaNs produced
#> HI-REDUCTION       7 17.913114 -11.603908
#> Warning: NaNs produced
#> HI-REDUCTION       9 5.415279 -11.603908
#> Warning: NaNs produced
#> HI-REDUCTION      11 -3.412974 -11.603908
#> HI-REDUCTION      13 -8.018030 -11.603908
#> LO-REDUCTION      15 -10.336211 -11.603908
#> LO-REDUCTION      17 -11.081040 -11.603908
#> EXTENSION         19 -11.295930 -12.061705
#> LO-REDUCTION      21 -11.603908 -12.061705
#> REFLECTION        23 -11.813826 -12.087620
#> REFLECTION        25 -12.061705 -12.199591
#> LO-REDUCTION      27 -12.087620 -12.199591
#> LO-REDUCTION      29 -12.158184 -12.199591
#> LO-REDUCTION      31 -12.191726 -12.199591
#> HI-REDUCTION      33 -12.192269 -12.199591
#> HI-REDUCTION      35 -12.197784 -12.199591
#> LO-REDUCTION      37 -12.198015 -12.199591
#> HI-REDUCTION      39 -12.199555 -12.199776
#> REFLECTION        41 -12.199591 -12.200058
#> HI-REDUCTION      43 -12.199776 -12.200092
#> HI-REDUCTION      45 -12.200058 -12.200142
#> HI-REDUCTION      47 -12.200092 -12.200155
#> HI-REDUCTION      49 -12.200142 -12.200160
#> HI-REDUCTION      51 -12.200155 -12.200177
#> HI-REDUCTION      53 -12.200160 -12.200177
#> LO-REDUCTION      55 -12.200171 -12.200179
#> HI-REDUCTION      57 -12.200177 -12.200179
#> HI-REDUCTION      59 -12.200178 -12.200179
#> HI-REDUCTION      61 -12.200179 -12.200179
#> HI-REDUCTION      63 -12.200179 -12.200179
#> HI-REDUCTION      65 -12.200179 -12.200179
#> Exiting from Nelder Mead minimizer
#>     67 function evaluations used
 eqlabel(model=lapply(srs, model),
   param=lapply(srs, params))
#> $ricker
#> expression(rec %~% 119.4 %.% ssb %.% exp(-0.009451 %.% ssb))
#> 
#> $bevholt
#> expression(rec %~% 6736 %.% ssb/(52.2 + ssb))
#> 
 modlabel(model=lapply(srs, model),
   param=lapply(srs, params))
#> $ricker
#> expression(ricker(119.4, 0.009451))
#> 
#> $bevholt
#> expression(bevholt(6736.4, 52.2))
#>