Skip to content

Commit

Permalink
Update FLY groups nutrients
Browse files Browse the repository at this point in the history
  • Loading branch information
langbart committed Mar 29, 2024
1 parent 5851095 commit 7c37771
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions R/calculate-nutrients.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,16 @@ get_nutrients_table <- function(pars, summarise = TRUE, convert = TRUE) {
Selenium_mu = 40.6528,
Zinc_mu = 1.44887,
Protein_mu = 17.09566,
Omega3_mu = 0.2460711,
Omega_3_mu = 0.2460711,
Calcium_mu = 423.1434,
Iron_mu = 2.109762,
VitaminA_mu = 25.77763,
Vitamin_A_mu = 25.77763,
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(pelagics)
dplyr::bind_rows(fly_group)

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

0 comments on commit 7c37771

Please sign in to comment.