Repository navigation
Preferred units when some unit sets need no conversion - #711
Merged
Merged
Conversation
billdenney
force-pushed
the
fix/concu-pref-per-group-units
branch
from
November 11, 2026 20:41
e6db766 to
5d36149
Compare
With unit columns and a preferred unit, a unit set already in the preferred units got a table without PPSTRESU and conversion_factor, while the sets that convert had them. Composing the secondary parameter units read the missing columns as zero-length and stopped with "arguments imply differing number of rows: 1, 0". Every unit set now has the standardization columns when any has them, with the set's own units and a factor of 1 where it does not convert, as pknca_units_table() does within one set. The comment that preferred units only apply to scalar units was wrong: pknca_set_units() keeps them for unit columns too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
billdenney
force-pushed
the
fix/concu-pref-per-group-units
branch
from
November 12, 2026 15:20
5d36149 to
eb84176
Compare
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.
concu_pref(ordoseu_pref) with unit columns that differ between groups stoppedPKNCAdata()with "arguments imply differing number of rows: 1, 0" when a group was already in the preferred units. Repro: parent in mg/L and metabolite in ng/mL, withconcu_pref = "mg/L".Fix
Every unit set now has the
PPSTRESU/conversion_factorcolumns, using its own units and a factor of 1 where it does not convert, aspknca_units_table()already does within one set.Tests
The units table and the
PPSTRESvalues for both concentration and dose unit columns.Stacked on
fix/units-join-group-types; this PR's diff is only this fix.🤖 Generated with Claude Code