Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jillian Dunic committed Jun 18, 2024
1 parent 7b2703c commit 5faee5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/load-iphc-dat.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ load_iphc_dat <- function(species = NULL) {
)) |>
dplyr::mutate(effective_skates = case_when(
.data$species_common_name == "pacific halibut" & .data$year == 2012 ~ NA,
.default = effective_skates * (hooks_observed / hooks_retrieved)
.data$species_common_name != "pacific halibut" & .data$sample_type == "20 hooks" ~
effective_skates * (hooks_observed / hooks_retrieved),
.default = effective_skates
)) # see eqn G.4 in Anderson et al. 2019
}

0 comments on commit 5faee5e

Please sign in to comment.