Bug fix: units produce a crash with multispec data#930
Merged
Conversation
1 task
Gero1999
approved these changes
Jan 26, 2026
Collaborator
Gero1999
left a comment
There was a problem hiding this comment.
Noticed the original error message mentioned unrelated parameters to AMOUNTU:
Warning: Error in pknca_unit_conversion: Units are provided for some but not all parameters; missing for: adj.r.squared, clast.pred, half.life, lambda.z, lambda.z.n.points, lambda.z.time.first, lambda.z.time.last, r.squared, span.ratio, tlast, tmax
This error can be converted to a warning using `PKNCA.options(allow_partial_missing_units = TRUE)`
But I guess this data-case solution made it work for the testing data... I will approve
Collaborator
|
For future reference, lets include the original issue that produced this: #907 |
Shaakon35
approved these changes
Jan 27, 2026
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.
Issue
Closes #925
Description
Multispec data was crashing due to AMOUNTU column having NA and non NA units, which had changes in processing after #907
This PR updates the units table build to allow NA units in AMOUNTU, as they are handled differently to AVALU and the others. AMOUNTU can have NA units if there is no VOLUME value.
Definition of Done
How to test
Try to run NCA with multispec data in testthat folder
Contributor checklist