Internal helper used by MizerSim rate methods whose one-time result is an
ArraySpeciesBySize. The helper applies the supplied rate function to each
selected time slice, stacks the results, and restores the appropriate mizer
array class when dimensions have not been dropped.
get_species_size_rate_from_sim(
sim,
time_range,
drop,
rate_fun,
value_name,
units = NULL
)A time x species x size array, possibly with dimensions dropped.
A MizerSim object.
A numeric or character vector of times.
If TRUE, dimensions of length 1 are dropped from the result.
A function accepting a single simulation slice as returned by
get_sim_rate_slice().
Name of the value stored in the returned array.
Optional units of the value stored in the returned array.