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

getAges message for kept age methods #49

Closed
chantelwetzel-noaa opened this issue Feb 17, 2021 · 2 comments
Closed

getAges message for kept age methods #49

chantelwetzel-noaa opened this issue Feb 17, 2021 · 2 comments
Labels
topic: documentation Related to documentation of code, methods, etc. type: enhancement

Comments

@chantelwetzel-noaa
Copy link
Contributor

https://github.com/nwfsc-assess/PacFIN.Utilities/blob/d0b9862aff692b2993560c4045f07fb414b2c87f/R/getAge.R#L86

This function when verbose = TRUE appears to print out an incorrect list of 'good' age methods. When run for an example where the keep_age_methods = c(1, "B", "BB") the print out of age types kept are:

The following age types were kept in the data:
NA, 3, 9, B, and UNK

However, the only kept ages in the age column correspond only to "B" as expected. So, I think this function is working correctly but kicking out a misleading message.

@kellijohnson-NOAA
Copy link
Contributor

it is telling you all ageing methods across age readers, so that might be the difference.

there is a disconnect in what is being printed (all age types) and what is used to find the best age (only those in the included methods). keep this issue open and i will work making them match.

@kellijohnson-NOAA
Copy link
Contributor

There is no way to know which method was used for the best age. I can only search across age methods used for the read.

NWFSC ageing lab (phone call with Patrick):
Value in the best age column might not even be from a read. Sometimes, reconciling happens where a senior reader is sent to check some ages and then together the readers can even come up with a new age. Typically, this will be using the same method as what is in the age_method columns but not always. We will need to leave it up to the labs to determine what the best age is. Hopefully, in the future the best_...age_method column will be filled and we can utilize this information then, but right now this is all we can do. I did upgrade the messages to show something more comprehensible and less nuanced then what was previously printed. Like comparisons across how many age methods there are for each age reader.

From Washington (email):
If only age_1, best_age = age_1
If difference between age_1 and age_2 <=3, randomly choose from the two ages. If the difference > 3, age readers need to reconcile between the reads. That is, the best_age will have to be manually keyed in.
When there are 3 age reads, best_age will be assigned only when age_1 = age_2 = age_3. Otherwise, age readers need to make the assignment.

For people that are working with species that should not be aged using a certain method, then they will want to clean their data using external methods and not those inside cleanPacFIN. I am happy to add any additional filtering processes that people want. Just open a new issue and we can deal with these on a case-by-case basis. I am going to leave the enhancement tag on this issue even after closing to facilitate future searching. PacFIN has been notified that this column is currently incorrect in their data in that it repeats some best ages rather than providing an ageing method.

@kellijohnson-NOAA kellijohnson-NOAA added the topic: documentation Related to documentation of code, methods, etc. label May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation of code, methods, etc. type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants