
Resolve a biology vector to age-basis
resolve_bio_vector.RdIf the vector length matches n_age, it is returned unchanged
(assumed to already be on an age basis). If the vector length matches
n_len (and n_len != n_age), it is converted to age using the
probability-of-length-at-age matrix: vec_a = t(pla) %*% vec_l.
Otherwise an informative error is thrown.
Arguments
- vec
Numeric vector (length
n_ageorn_len). May be an AD type insideopal_model().- n_age
Integer. Number of age classes.
- n_len
Integer. Number of length bins.
- pla
Matrix (
n_lenxn_age). Probability of length at age (columns sum to 1), as returned byget_pla.- name
Character. Name of the vector used in warning/error messages.