Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions R/convert_output.R
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ convert_output <- function(
grepl(":_[0-9][0-9]$", label) ~ stringr::str_extract(label, "(?<=_)[0-9][0-9]+"),
TRUE ~ NA
)
} else if ("fleet_name" %in% colnames(df3)) {
fleet_name
} else {
fleet
},
Expand Down Expand Up @@ -1222,8 +1224,13 @@ convert_output <- function(
paste0("Some parameters were not found or included in the output file. The following parameters were not added into the new output file: \n", paste(miss_parms, collapse = "\n"))
)
}
out_new <- Reduce(rbind, out_list) |>
dplyr::mutate(fleet = fleet_names[fleet])
out_new <- Reduce(rbind, out_list)
out_new <- out_new |>
dplyr::mutate(fleet = dplyr::case_when(
any(unique(out_new$fleet) %in% fleet_names) ~ fleet,
TRUE ~ fleet_names[fleet]
)
)
} else if (model %in% c("bam", "BAM")) {
#### BAM ####
# Extract values from BAM output - model file after following ADMB2R
Expand Down
2 changes: 1 addition & 1 deletion R/plot_biomass.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ plot_biomass <- function(
# Filter data for spawning biomass
prepared_data <- filter_data(
dat = dat,
label_name = "^biomass$|^biomass_retained$|^biomass_dead$",
label_name = "^biomass$",
geom = geom,
group = group,
facet = facet,
Expand Down
2 changes: 1 addition & 1 deletion R/table_landings.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' table_landings(
#' stockplotr::example_data,
#' unit_label = "landings label",
#' group =
#' group = "fleet"
#' )
table_landings <- function(
dat,
Expand Down
Binary file modified data/example_data.rda
Binary file not shown.
8 changes: 4 additions & 4 deletions inst/resources/ss3_var_names.csv
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ SPAWN_RECRUIT,mature_num,mature_abundance
TIME_SERIES,mature_num,mature_abundance
SPAWN_RECRUIT,raw_dev,
TIME_SERIES,bio_all,biomass
TIME_SERIES,bio_smry,biomass_midyear
TIME_SERIES,bio_smry,biomass_reference_age
TIME_SERIES,recruit,recruitment
TIME_SERIES,smrybio,biomass_midyear
TIME_SERIES,smrynum,abundance_midyear
TIME_SERIES,sel(b),biomass
TIME_SERIES,dead(b),biomass_dead
TIME_SERIES,retain(b),biomass_retained
TIME_SERIES,sel(b),catch_selected
TIME_SERIES,dead(b),catch_dead
TIME_SERIES,retain(b),catch_retained
TIME_SERIES,sel(n),numbers
TIME_SERIES,dead(n),numbers_dead
TIME_SERIES,retain(n),numbers_retained
Expand Down
2 changes: 1 addition & 1 deletion man/table_landings.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/theme_noaa.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading