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

Create InterCatch format output from doEstimationForAllStrata() function #209

Open
davidcurrie2001 opened this issue Oct 17, 2024 · 3 comments
Assignees

Comments

@davidcurrie2001
Copy link
Contributor

davidcurrie2001 commented Oct 17, 2024

Create a function that takes the output from doEstimationForAllStrata() and converts it into the InterCatch exchange format https://www.ices.dk/data/Documents/Intercatch/IC-ExchangeFormat1-0.pdf

@davidcurrie2001 davidcurrie2001 self-assigned this Oct 17, 2024
davidcurrie2001 added a commit that referenced this issue Oct 17, 2024
…llStrata() and converts it into the InterCatch exchange format (#209)
@davidcurrie2001
Copy link
Contributor Author

First version of function with tests and vignette added. doEstimationForAllStrata() doesn't produce numbers at length/age outputs so only HI and SI record types are currently created in the IC output.

@rix133
Copy link
Contributor

rix133 commented Oct 18, 2024

I think the verbose flag could show what fields are needed and if they are mandatory (and want the options are) eg like:

if(verbose) {
    cat("HI table columns:\n")
    cat(paste0(HIdefinitions$Name, " = " , HIdefinitions$Type, "#required:", HIdefinitions$Mandatory , "\n"))
    cat("\n")
  }

also I think the definitions could benefit from columns like Mandatory and AcceptedValues
I think in the vignette some mandatory fields are left blank

@davidcurrie2001
Copy link
Contributor Author

Updated function so that it also creates SD rows.
I've added in the "Mandatory" status, and you get a warning if one of these columns is missing. If you set verbose to TRUE you also get a message if any other columns are missing.
Currently I've assumed the function will be getting the data to format in 1 big data frame but this might not be the most sensible way of doing it - it might be better to have a separate input parameter for the age/length data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants