Check a Stock Synthesis control file to determine if the desired fleets have q parameters set up.
check_q(ctl_list, Nfleets = lifecycle::deprecated(), desiredfleets)
A control file read in by SS_readctl
.
Deprecated with ss3sim version 1.19.1 because
the number of fleets is available in ctl_list
.
A numeric vector specifying which fleets should have catchability parameters.
A list with two vectors, add
and remove
,
specifying which fleets to add and which to remove from the control file.
change_q()
for actually adding or removing the fleets.
# Keep just the fishery
stopifnot(check_q(ctl_list = codomctl, desiredfleets = 1)[["remove"]] == 2)
# All elements of the returned list should be NULL
# because the model only has two \eqn{q} parameters
stopifnot(all(mapply(is.null, check_q(codomctl, desiredfleets = 1:2))))
# Fleet 3 is not present
stopifnot(check_q(codomctl, desiredfleets = 1:3)[["add"]] == 3)
stopifnot(check_q(codomctl, desiredfleets = 2:3)[["remove"]] == 1)