Skip to content

Commit

Permalink
harmonize colnames
Browse files Browse the repository at this point in the history
  • Loading branch information
mkapur-noaa committed Jun 6, 2024
1 parent bec4fab commit 44d024f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 8 additions & 6 deletions 2024/R/goa-fhs-hproj-2024.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ catch <- catch0 %>%
names_from = FMP_SUBAREA,
values_from = STONS) %>%
## calculate totals - reformatting happens in .Rmd
summarise(EGULF = sum(WY,EY,SE,na.rm = TRUE),
WGULF = WG,
CG,
TTONS = sum(WGULF, CG, EGULF), .by = YEAR) %>%
select(YEAR, TTONS, WGULF, CG, EGULF)
summarise(EGOA = sum(WY,EY,SE,na.rm = TRUE),
WGOA = WG,
CGOA=CG,
TTONS = sum(WGOA, CG, EGOA), .by = YEAR) %>%
select(year = YEAR, TTONS, WGOA, CGOA, EGOA)

write.csv(catch, file=here(year, 'data','output',
paste0(Sys.Date(),'-catch_observed.csv') ), row.names=FALSE)
Expand Down Expand Up @@ -260,5 +260,7 @@ apportionment2[3,4] <- apportionment2[3,4]+diff24
abc_y1 - sum(apportionment2[2,3:6])==0
abc_y2 - sum(apportionment2[3,3:6]) ==0

write.csv(apportionment2,file = here::here(year,'apportionment',paste0(Sys.Date(),"-AreaAppportionment.csv")))
write.csv(apportionment2,
file = here::here(year,'apportionment',
paste0(Sys.Date(),"-AreaApportionment.csv")))

1 change: 0 additions & 1 deletion 2024/safe/11-tables.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

```{r tab1}
catches <- read.csv(here::here(this_year,'data','output','2024-06-06-catch_observed.csv'))
catches$EGOA<-round(catches$EGOA, 0)
catches$EGOA[catches$EGOA==0] <- "<1"
Expand Down

0 comments on commit 44d024f

Please sign in to comment.