Skip to content

Commit

Permalink
Update renaming section of run_SSMSE_iter to account for input sample…
Browse files Browse the repository at this point in the history
…_struct with no SE (following failed test)
  • Loading branch information
CassidyPeterson-NOAA committed Jan 31, 2024
1 parent 132b649 commit 93ff768
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/runSSMSE.R
Original file line number Diff line number Diff line change
Expand Up @@ -526,14 +526,14 @@ run_SSMSE_iter <- function(out_dir = NULL,
if(!is.null(names(sample_struct$catch)[1])){if(names(sample_struct$catch)[1]=="year"){ names(sample_struct$catch)[1]<-"Yr"}}
if(!is.null(names(sample_struct$catch)[2])){if(names(sample_struct$catch)[2]=="seas"){ names(sample_struct$catch)[2]<-"Seas"}}
if(!is.null(names(sample_struct$catch)[3])){if(names(sample_struct$catch)[3]=="fleet"){ names(sample_struct$catch)[3]<-"FltSvy"}}
if(!is.null(names(sample_struct$catch)[4])){if(names(sample_struct$catch)[4]=="catch_se"){ names(sample_struct$catch)[4]<-"SE"}}
if(ncol(sample_struct$catch)>3){ if(!is.null(names(sample_struct$catch)[4])){if(names(sample_struct$catch)[4]=="catch_se"){ names(sample_struct$catch)[4]<-"SE"}} }

if(!is.null(names(sample_struct$CPUE)[1])){if(names(sample_struct$CPUE)[1]=="year"){ names(sample_struct$CPUE)[1]<-"Yr"}}
if(!is.null(names(sample_struct$CPUE)[2])){if(names(sample_struct$CPUE)[2]=="seas"){ names(sample_struct$CPUE)[2]<-"Seas"}}
if(!is.null(names(sample_struct$CPUE)[3])){if(names(sample_struct$CPUE)[3]=="index"){ names(sample_struct$CPUE)[3]<-"FltSvy"}}
if(!is.null(names(sample_struct$CPUE)[4])){if(names(sample_struct$CPUE)[4]=="se_log"){ names(sample_struct$CPUE)[4]<-"SE"}}
if(ncol(sample_struct$CPUE)>3){ if(!is.null(names(sample_struct$CPUE)[4])){if(names(sample_struct$CPUE)[4]=="se_log"){ names(sample_struct$CPUE)[4]<-"SE"}} }

if(!is.null(names(sample_struct$lencomp)[4])){ if(names(sample_struct$lencomp)[4]=="Gender"){ names(sample_struct$lencomp)[4]<-"Sex"} }
if(!is.null(names(sample_struct$lencomp)[4])){if(names(sample_struct$lencomp)[4]=="Gender"){ names(sample_struct$lencomp)[4]<-"Sex"} }
if(!is.null(names(sample_struct$agecomp)[4])){if(names(sample_struct$agecomp)[4]=="Gender"){ names(sample_struct$agecomp)[4]<-"Sex"}}
sample_struct <- check_sample_struct(sample_struct)
} else {
Expand Down

0 comments on commit 93ff768

Please sign in to comment.