Check and standardize list components of sampling functions

standardize_sampling_args(
  fleets,
  years,
  other_input,
  return_val = "other_input",
  other_input_name = "other_input"
)

Arguments

fleets

Fleet numbers as a vector.

years

Number of years as a list. The number of list components should be one or the same length as fleets. Within the list components should be a vector of years to correspond with each fleet.

other_input

Some other input to interpret. The number of list components should be one or the same length as fleets. Within the list components should be a vector of length 1 the same length as the vectors within years.

return_val

If other_input, return the manipulated other_input value; if years, return the manipulated year input. If "both" return both as list components.

other_input_name

Only necessary if both is used as the return value.