Skip to content

Commit

Permalink
restore fly pelagics group
Browse files Browse the repository at this point in the history
  • Loading branch information
langbart committed Mar 28, 2024
1 parent f4a789e commit 5851095
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion R/calculate-nutrients.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,20 @@ get_nutrients_table <- function(pars, summarise = TRUE, convert = TRUE) {
interagency_code = "FLY"
)

#nutrients_tab <-
# nutrients_tab %>%
# dplyr::bind_rows(fly_group)

# use pelagic fish groups to infer FLY nutrients values
pelagics <-
nutrients_tab %>%
dplyr::filter(.data$interagency_code %in% c("CLP", "RAX", "SDX")) %>%
dplyr::summarise(dplyr::across(dplyr::where(is.numeric), ~ median(.x, na.rm = T))) %>%
dplyr::mutate(interagency_code = "FLY")

nutrients_tab <-
nutrients_tab %>%
dplyr::bind_rows(fly_group)
dplyr::bind_rows(pelagics)

if (isTRUE(convert)) {
nutrients_tab <-
Expand Down

0 comments on commit 5851095

Please sign in to comment.