Open
Conversation
…dup) Three targeted improvements with no functionality change: 1. pk.calc.half.life: pre-build the two-column data.frame passed to fit_half_life() once before the loop rather than reconstructing it on every iteration. For a subject with N eligible post-tmax points this reduces data.frame() calls in that loop from N to 1. 2. pk.nca.intervals: accumulate interval results in a list and combine with dplyr::bind_rows() at the end instead of growing a data.frame via repeated rbind(). For analyses with multiple dosing intervals per subject the old pattern caused quadratic copy overhead. 3. pk.nca.intervals: hoist the PKNCA.options()$debug lookup out of the per-interval loop. The options object passed in is already the fully-merged options (assembled once in pk.nca()), so there is no need to re-query the package environment on every iteration. Benchmarked on 200 subjects x 12 time points x 10 reps (single interval, auclast/cmax/tmax/half.life/tlast): median 2.46s -> 2.23s (~10% faster). The rbind fix provides additional gains for multi-interval analyses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace [Quick Start](Quick Start) with [Quick Start](#quick-start) to produce a valid in-document anchor rather than a file URI, resolving the CRAN NOTE about an invalid file URI in inst/doc/v01-introduction-and-usage.html. Co-Authored-By: Claude Sonnet 4.6 <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.
No description provided.