Open
Conversation
I added the sparse AUMC function along with five AUC-variant PK parameters. When running the tests, I encountered the following error: Failure (test-pk.calc.all.R:789:5): pk.nca can be run for each parameter independently (humanpred#473) all(is.na(param_res$result$PPORRES)) is not FALSE actual: TRUE expected: FALSE The parameter mrt.sparse.last was not being calculated independently. To address this, I added the sparse-related parameters to test-pk.calc.all.R under non_pknca_covered_params: f, time_above, mrt.md.obs, mrt.md.pred, sparse_auclast, sparse_auc_se, sparse_auc_df, sparse_aumclast, sparse_aumc_se, sparse_aumc_df, vss.md.obs, vss.md.pred, ceoi, cl.sparse.last, mrt.sparse.last, vz.sparse.last, vss.sparse.last, kel.sparse.last Please let me know if this approach looks correct. After this update, the test results are: [ FAIL 0 | WARN 4 | SKIP 0 | PASS 2264 ] Remaining warning: Warning (test-PKNCA.options.R:440:3): PKNCA.set.summary input checking reset = TRUE is not intended for general use; summary() may not work after resetting summary instructions.
billdenney
requested changes
Mar 30, 2026
tests/testthat/test-pk.calc.all.R
Outdated
| non_pknca_covered_params <- c( | ||
| "f", "time_above", "mrt.md.obs", "mrt.md.pred", "sparse_auclast", "sparse_auc_se", "sparse_auc_df", | ||
| "vss.md.obs", "vss.md.pred", "ceoi" | ||
| "f", "time_above", "mrt.md.obs", "mrt.md.pred", |
Member
There was a problem hiding this comment.
We should ensure that all of these parameters are covered and not add to this list.
| #' pharmacokinetics. Journal of Biopharmaceutical Statistics. 1998;8(2):317-328. | ||
| #' doi:10.1080/10543409808835241 | ||
| #' @export | ||
| var_sparse_auc <- function(sparse_pk) { |
Member
There was a problem hiding this comment.
Why did you remove this function?
R/sparse.R
Outdated
| options=options, | ||
| auc.type="AUClast", | ||
| lambda.z=NA | ||
| conc = conc, time = time, subject = subject, ..., |
Member
There was a problem hiding this comment.
There are many whitespace-only changes that make the code harder to review. Please remove the whitespace changes.
| #' doi:10.1080/10543409808835241 | ||
| #' @keywords internal | ||
| #' @export | ||
| var_sparse_aumc <- function(sparse_pk) { |
Member
There was a problem hiding this comment.
It looks like you actually just moved the function down here. Please move it back so that the diff is easier to review.
…ach parameter independently (humanpred#473)") test.
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.
I added the sparse AUMC function along with five AUC-variant PK parameters. When running the tests, I encountered the following error: Failure (test-pk.calc.all.R:789:5): pk.nca can be run for each parameter independently (#473) all(is.na(param_res$result$PPORRES)) is not FALSE
actual: TRUE
expected: FALSE
The parameter mrt.sparse.last was not being calculated independently. To address this, I added the sparse-related parameters to test-pk.calc.all.R under non_pknca_covered_params: f, time_above, mrt.md.obs, mrt.md.pred,
sparse_auclast, sparse_auc_se, sparse_auc_df,
sparse_aumclast, sparse_aumc_se, sparse_aumc_df,
vss.md.obs, vss.md.pred, ceoi,
cl.sparse.last, mrt.sparse.last, vz.sparse.last,
vss.sparse.last, kel.sparse.last
Please let me know if this approach looks correct. After this update, the test results are:
[ FAIL 0 | WARN 4 | SKIP 0 | PASS 2264 ]
Remaining warning:
Warning (test-PKNCA.options.R:440:3): PKNCA.set.summary input checking reset = TRUE is not intended for general use; summary() may not work after resetting summary instructions.