Skip to content

Commit

Permalink
make robust to unrealistic 0 values for either length or weight
Browse files Browse the repository at this point in the history
  • Loading branch information
ecophilina committed Sep 10, 2024
1 parent a0d468e commit 93b1462
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions R/split-by-sex-maturity.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ split_catch_by_sex <- function(survey_sets, fish,

fish_lengths <- fish %>%
## when some surveys or sets of years lack maturity data, can we still get something from other surveys?
filter(survey_abbrev %in% survey) %>%
filter(year %in% years) %>%
filter(!is.na(length))
filter(survey_abbrev %in% survey) |>
filter(year %in% years) |>
# filter(!is.na(length)) |>
# zero lengths and weights shouldn't be possible! but rex sole from mssm has some
filter(length > 0) |>
filter(weight > 0| is.na(weight))

# if (split_by_weight) {

Expand Down

0 comments on commit 93b1462

Please sign in to comment.