Closed lentinj closed 2 months ago
@bthe In theory the issue-95-transformfs-length
branch should add the length transform, but I've not really tested it at all beyond eyeballing the code that comes out. You're welcome to have a try if you like. Usage should be along the lines of:-
transform_fs = list(length = g3_formula(g3_param_array('reader1matrix', value = diag(10))[g3_idx(stock__length_idx),]))
Note that unlike with age the result of this needs to provide a lengthgroup vector. For each input length scalar, we're reconstituting a transformed lengthgroup vector.
I've now merged an alternative implementation, that works by supplying a matrix:
g3l_abundancedistribution("len",
obsdata,
function_f = g3l_distribution_sumofsquares(),
stocks = list(prey_a),
transform_fs = list(
length = quote(diag(10 * prey_a__midlen)) ),
report = TRUE),
Unlike any other dimensions, the result will need to produce lengthgroup vectors.