Skip to content

Commit

Permalink
fixed param usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaracappa1 committed Sep 23, 2024
1 parent 0193694 commit 7398063
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions R/diag_fleet_catch.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#'
#'
#'@param fgs A character string. Path to location of functional groups file.
#'@param fishery.file A character string. Path to the fishery definitions file.
#'@param fishery.prm A character string. Path to the fishery definitions file.
#'@param bgm A character string. Path to the bgm file.
#'@param catch.ref A data.frame containing reference catch by fleet data (species|fleet|polygon|ref.value)
#'@param speciesCodes Character vector. A vector of Atlantis species codes in which to test for stability.
Expand Down Expand Up @@ -33,7 +33,7 @@
#'@importFrom magrittr %>%

diag_fleet_catch <- function(fgs,
fishery.file,
fishery.prm,
catch.file,
bgm,
catch.ref,
Expand All @@ -45,14 +45,14 @@ diag_fleet_catch <- function(fgs,
boxes = atlantistools::convert_bgm(bgm)%>%
dplyr::distinct(polygon,inside_lat,inside_long)

catch.fleet =atlantisprocessing::process_catch_fleet(fishery.prm = fishery.file,
catch.fleet =atlantisprocessing::process_catch_fleet(fishery.prm = fishery.prm,
catch = catch.file,
groups.file = fgs.file)
groups.file = fgs)

if(!is.null(speciesCodes)){
fgs.df = read.csv(fgs.file,as.is =T)
fgs.df = read.csv(fgs,as.is =T)

spp.match = fgs$LongName[which(fgs$Code %in% speciesCodes)]
spp.match = fgs.df$LongName[which(fgs.df$Code %in% speciesCodes)]

catch.fleet = catch.fleet %>%
dplyr::filter(species %in% spp.match)
Expand Down
4 changes: 2 additions & 2 deletions man/diag_fleet_catch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7398063

Please sign in to comment.