Skip to content

Commit

Permalink
Updated calculation for landings plot's y axis max, since it's a stac…
Browse files Browse the repository at this point in the history
…ked area plot
  • Loading branch information
sbreitbart-NOAA committed Jan 23, 2025
1 parent 9682059 commit ac9bdd9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/write_captions.R
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,13 @@ write_captions <- function(dat, # converted model output object
# t.series is associated with a conversion from BAM output and CATCH with SS3 converted output
!is.na(fleet)
) |>
dplyr::slice(which.max(estimate)) |>
dplyr::select(estimate) |>
dplyr::group_by(fleet, year) |>
dplyr::summarise(max_est = max(estimate)) |>
dplyr::filter(!is.na(max_est)) |>
dplyr::group_by(year) |>
dplyr::summarise(max_est_yr = sum(max_est)) |>
dplyr::slice(which.max(max_est_yr)) |>
dplyr::select(max_est_yr) |>
as.numeric() |>
round(digits = 2)

Expand Down

0 comments on commit ac9bdd9

Please sign in to comment.