Closed willbutler42 closed 1 year ago
This isn't as simple as this unfortunately, whilst this probably works, straight stock_param(stock, 'K', name_part = c('species', 'sex'))
won't. The problem here is conflating a vector with the unparsed code c('species', 'sex')
. With a single-length constant it doesn't matter, they're the same thing, but the code to generate a 2-item vector isn't the same as a 2 item vector.
Easy enough to sort though.
The above fixes that, adding documentation & tests as we go.
Thanks, should the same fix be applied in 'stock_param_table' too?
Whoops :) Thanks for pointing that out.
Allows multiple name parts to be used for parameter names, e.g.,
g3_parameterized('K', by_stock = c('species', 'sex'))