docs: document filter_interval's actual start-time-only selection - #585
Merged
Conversation
Per issue 577, filter_interval() selects rows for an interval by start <= time & time <= end (time < end for doses) and never reads the duration column, while the documentation previously described selection based on both the beginning and ending of the duration (the v03 vignette, already corrected in a prior merge). This documents the actual behavior everywhere else, without any behavior change: - Add roxygen for the internal filter_interval() itself stating the time-only selection rule and that duration is ignored during selection. - Describe interval data selection in the pk.nca() and check.interval.specification() details: rows are selected by their time (for duration data, the collection or administration start time) falling within [start, end]; a collection straddling the interval end contributes its full amount, so collection boundaries should be aligned with interval boundaries. - Expand the PKNCAconc() duration argument documentation with the same clarification. - Add a development-version NEWS bullet for the documentation clarification. Co-Authored-By: Claude Fable 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.
Fixes #577.
The incorrect "beginning and ending" sentence existed only in the v03 vignette (already corrected in #576), and no R documentation described interval data selection at all — so this documents the actual rule everywhere it belongs: new roxygen for the internal
filter_interval(), a details paragraph inpk.nca()(including that a dose exactly atendis excluded), the same paragraph incheck.interval.specification(), and an expandeddurationargument doc inPKNCAconc(). No behavior change. If implementing the duration-aware rule is preferred instead, that supersedes this — see the issue discussion.Verification: 653 existing tests across the four touched areas pass; only the four intended man/ files regenerated.
🤖 Generated with Claude Code