Conversation
roninsightrx
commented
Jul 8, 2025
roninsightrx
commented
Jul 8, 2025
Contributor
Author
roninsightrx
left a comment
There was a problem hiding this comment.
few comments
jasmineirx
reviewed
Jul 8, 2025
Contributor
jasmineirx
left a comment
There was a problem hiding this comment.
in general looks good! a couple minor comments
Co-authored-by: Jasmine Hughes <43552465+jasmineirx@users.noreply.github.com>
Co-authored-by: Jasmine Hughes <43552465+jasmineirx@users.noreply.github.com>
jasmineirx
reviewed
Jul 9, 2025
| lagtime_ode <- attr(ode, "lagtime") | ||
| # override from ode if not specified by user and defined in ode | ||
| if(is.null(lagtime) && !is.null(lagtime_ode) && !lagtime_ode %in% c("NULL", "undefined")) { | ||
| if(is.null(lagtime) && !is.null(lagtime_ode) && lagtime_ode[1] != "NULL" && lagtime_ode[1] != "undefined") { |
Contributor
There was a problem hiding this comment.
should this be a !any(lagtime_ode %in% c("NULL", "undefined"))
jasmineirx
approved these changes
Jul 9, 2025
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.
Lagtime was previously handled by just adding the lagtime for a given compartment to each dose given into that compartment. So on the level of the event table created that was used as input for the simulation. However, this introduced the problem that the lagtime could not be estimated by PKPDmap (because it is essentially fixed).
To solve this, I moved the functionality that adapted the event table from happening before the core simulation into the core simulation function itself, right before the actual simulation. Now, this core function requires an additional lagtime parameter, which is then used to adapt the event table.
Related PR in PKPDmap