Skip to content

Commit

Permalink
edit get_F() function to account for fleets of type=3 in the list of …
Browse files Browse the repository at this point in the history
…fleet names
  • Loading branch information
CassidyPeterson-NOAA committed Jan 26, 2024
1 parent 8a6c2d8 commit 2af666c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/calc_F.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ get_F <- function(timeseries, fleetnames) {
# feed back as a named vector sorted by fleet, then season. Names are the
# same as in the PARAMETERS section of report.sso
init_F <- init_F[order(init_F[, "Fleet"], init_F[, "Seas"]), ]
fleetnames_df <- data.frame(
Fleet = seq_along(fleetnames),
fleetname = fleetnames
)

# edit to account for fleets of type==3 in list of fleets
fleetnumbers = which(dat$fleetinfo$fleetname %in% fleetnames)
fleetnames_df<- data.frame(Fleet=fleetnumbers, fleetname=fleetnames)

init_F <- merge(init_F, fleetnames_df)
init_F_names <- paste0(
"InitF_seas_", init_F[["Seas"]], "_flt_", init_F[["Fleet"]],
Expand Down

0 comments on commit 2af666c

Please sign in to comment.