Skip to content

Commit

Permalink
load update
Browse files Browse the repository at this point in the history
  • Loading branch information
tymjackson committed Oct 15, 2024
1 parent 0ac6c8d commit 2ed55c6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R/get_total_catch.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ get_total_catch <- function(pot_data, crab_data, ft_data, stock, by = NULL, lump
if(!is.null(by_cp)){
if(!(by_cp %in% names(ft_data))){stop(paste0("One or more of ", by_cp, " not in fish ticket data !!"))}
}
## filter pots for AIGKC
if(stock %in% c("AIGKC", "EAG", "WAG")) {
crab_data %>%
filter(!(gearcode %in% c(1:3, 21:23, 80))) -> crab_data
pot_data %>%
filter(!(gearcode %in% c(1:3, 14:23, 80:81))) -> pot_data

}

# clean up by data in crab data and save it as a separate object
crab_data_tc <- crab_data
if("shell" %in% by & lump == T){
Expand All @@ -52,6 +61,7 @@ get_total_catch <- function(pot_data, crab_data, ft_data, stock, by = NULL, lump
filter(sex %in% 1:2) -> crab_data_tc
}


# get average wt
crab_data %>%
# remove known bad biotwine records
Expand Down

0 comments on commit 2ed55c6

Please sign in to comment.