gadget-framework/gadget3

Specifying selectivity by input variable name

lentinj opened this issue · 1 comments

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.

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