gadget-framework / gadget3

TMB-based gadget implemtation
GNU General Public License v2.0
8 stars 6 forks source link

Specifying selectivity by input variable name #87

Open lentinj opened 1 year ago

lentinj commented 1 year ago

It'd be nice to do:

g3a_predate_fleet(f_stock, list(imm_stock, mat_stock), selectivity = list(imm_stock = x, mat_stock = y), ...)

But this doesn't work, since we look up by the stock names, not the variable names.

We don't even necessarily know these names; we'd have to look up in the call structure with match.call()[['prey_stocks']] and hope the list() was part of the argument list.

lentinj commented 9 months ago

The use case for this evaporated with g3_parameterized(... by_predator = TRUE), but it'd still be nice I think.