Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove apc table #32

Open
kellijohnson-NOAA opened this issue Dec 9, 2022 · 0 comments
Open

Remove apc table #32

kellijohnson-NOAA opened this issue Dec 9, 2022 · 0 comments
Assignees
Labels
action: code Work on the code deadline: December topic: R functions Related to code in the R directory type: enhancement New feature or request
Milestone

Comments

@kellijohnson-NOAA
Copy link
Contributor

hakedataUSA/R/new_catch.R

Lines 107 to 127 in 6eaeed7

# todo: don't subtract tribal from shoreside when they are not
# added together
apc <- utils::read.csv(file.apc, check.names = FALSE)
apc[2, grep("shore", x = colnames(apc), ignore.case = TRUE)] <-
sprintf("%.0f", inc[inc[, "Year"] == year, "US_shore"] -
sum(ti[ti[, "year"] == year, "catch"]))
apc[2, grep("CP", x = colnames(apc), ignore.case = TRUE)] <-
sprintf("%.0f", inc[inc[, "Year"] == year, "atSea_US_CP"])
apc[2, grep("MS", x = colnames(apc), ignore.case = TRUE)] <-
sprintf("%.0f", inc[inc[, "Year"] == year, "atSea_US_MS"])
apc[2, grep("TAC", x = colnames(apc), ignore.case = TRUE)] <-
sprintf("%.0f", inc[inc[, "Year"] == year,
grep("UStotal", colnames(inc), ignore.case = TRUE)])
apc[2, grep("Tribal", x = colnames(apc), ignore.case = TRUE)] <-
sprintf("%.0f", sum(ti[ti[, "year"] == year, "catch"]))
apc[3, -1] <- sprintf("%2.1f%%",
type.convert(apc[2, -1], as.is = TRUE) /
type.convert(apc[1, -1], as.is = TRUE) * 100
)
colnames(apc)[1] <- ""
see pacific-hake/hake-assessment#966

@kellijohnson-NOAA kellijohnson-NOAA added type: enhancement New feature or request topic: R functions Related to code in the R directory action: code Work on the code deadline: December labels Dec 9, 2022
@kellijohnson-NOAA kellijohnson-NOAA self-assigned this Dec 9, 2022
@kellijohnson-NOAA kellijohnson-NOAA added this to the 2023 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: code Work on the code deadline: December topic: R functions Related to code in the R directory type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant