Learn R Programming

mizer (version 3.4.0)

species_size_range_mask: Which size classes lie inside each species' own size range

Description

A rate array is defined on the whole size grid, but a species only occupies the part of it between its w_min and w_max. The values outside that range are arithmetic rather than biology — the encounter rate a 40 kg Sprat would have — so plot() and summary() leave them out unless asked for them with all.sizes = TRUE. This is the single definition of which classes those are, so that the two cannot disagree about what the array contains.

Usage

species_size_range_mask(params, w, species)

Value

A logical matrix (species x size), TRUE where the size class lies inside that species' size range.

Arguments

params

A MizerParams object, or NULL.

w

The size represented by each column, from get_ArraySpeciesBySize_w(). Passed in rather than read from params because a bin-averaged array is drawn at the bin centres.

species

Character vector of the species, one per row.

Details

A species that the model does not know about — a row whose name is not in species_params, or any row at all when the array carries no params — has no range to be outside of, so all of its size classes are kept.