Repository navigation
feat: validate the LLOQ values in PKNCAconc() - #682
Merged
Merged
Conversation
PKNCAconc() checked only that the lloq column or scalar was numeric, with a checkmate error. Every non-missing value must now be finite and greater than zero, and a column or scalar that is entirely NA of any class (such as the logical NA of a column read from a file with no LLOQ) is accepted and stored as numeric NA. Everything else is the classed error pknca_error_conc_invalid_lloq, whose message names the offending values or the class. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The LLOQ check ran the comparison on the column itself, so a units column hit the units comparison method and failed with an unclassed error. The checks now use the plain numbers and the column is stored as given. The error lists at most five distinct invalid values and says when more were cut. The roxygen and NEWS now say that NaN is refused and that only an all-NA integer column becomes double. Tests pin integer storage, the full scalar message, factor, logical, and Date columns, an all-NA Date column, the cap, and units columns. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PKNCAconc() checked only that the lloq column or scalar was numeric, with a checkmate error.
Tests pin the exact class and message for each refused case and the accepted all-NA, mixed, units and valid cases. The lloq roxygen and NEWS.md describe the behavior.
🤖 Generated with Claude Code