Skip to content

docs: document filter_interval's actual start-time-only selection - #585

Merged
billdenney merged 1 commit into
mainfrom
577-filter-interval-duration-docs
Aug 9, 2026
Merged

docs: document filter_interval's actual start-time-only selection#585
billdenney merged 1 commit into
mainfrom
577-filter-interval-duration-docs

Conversation

@billdenney

Copy link
Copy Markdown
Member

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 in pk.nca() (including that a dose exactly at end is excluded), the same paragraph in check.interval.specification(), and an expanded duration argument doc in PKNCAconc(). 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

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>
@billdenney
billdenney merged commit 6b337f1 into main Aug 9, 2026
7 checks passed
@billdenney
billdenney deleted the 577-filter-interval-duration-docs branch August 9, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

filter_interval() ignores duration: duration-bearing samples are selected by collection start only, contradicting the documented rule

1 participant