From 666d3c895a634e6f6b04eb086abac2da340cb83b Mon Sep 17 00:00:00 2001 From: Bill Denney Date: Sat, 21 Oct 2023 10:27:06 -0400 Subject: [PATCH 1/2] Update spelling --- NEWS.md | 2 +- R/convert.R | 6 +++--- R/monolixNlmixr2est.R | 4 ++-- inst/WORDLIST | 26 ++++++++++++++++++++++---- vignettes/articles/running-monlix.Rmd | 12 ++++++------ 5 files changed, 34 insertions(+), 16 deletions(-) diff --git a/NEWS.md b/NEWS.md index cc6e0dd6..4c97701a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -19,7 +19,7 @@ changes in `focei`'s output (`$parHist` is now derived). * Changed the solving options to match the new steady state options in - `rxode2` and how NONMEM implements them. Also changed the itwres + `rxode2` and how NONMEM implements them. Also changed the iwres model to account for the `rxerr.` instead of the `err.` which was updated in `rxode2` as well. diff --git a/R/convert.R b/R/convert.R index 4146622f..ac2f6294 100644 --- a/R/convert.R +++ b/R/convert.R @@ -126,7 +126,7 @@ bblDatToMonolix <- function(model, data, table=nlmixr2est::tableControl(), rxCon call.=FALSE) } if (.conv0$hasTinf) { - warning("monolix changes infusion times for `tinf` with bioavailability differently than `nlmixr2`, make sure there is no bioavailibilty changes for this infusion in the model", + warning("monolix changes infusion times for `tinf` with bioavailability differently than `nlmixr2`, make sure there is no bioavailability changes for this infusion in the model", call.=FALSE) } if (.conv0$hasPhantom) { @@ -303,7 +303,7 @@ bblDatToNonmem <- function(model, data, table=nlmixr2est::tableControl(), .xtra <- paste0(" to convert the data with 'bblDatToNonmem'") model <- rxode2::assertRxUi(model, extra=.xtra) model <- rxode2::rxUiDecompress(model) - .ret <- .bblDatToNonmem (model, data, table, rxControl, + .ret <- .bblDatToNonmem (model, data, table, rxControl, fun="bblDatToNonmem", replaceEvid=5L, replaceOK=FALSE, software="NONMEM", env=env) nlmixr2est::nmObjUiSetCompressed(FALSE) @@ -374,7 +374,7 @@ bblDatToPknca <- function(model, data, table=nlmixr2est::tableControl(), rxControl=rxode2::rxControl(), env=NULL) { newData <- .bblDatToNonmem( - model, data, table, rxControl, + model, data, table, rxControl, fun="bblDatToPknca", replaceEvid=5L, replaceOK=TRUE, software="pknca", env=env ) diff --git a/R/monolixNlmixr2est.R b/R/monolixNlmixr2est.R index 60087a80..abee7064 100644 --- a/R/monolixNlmixr2est.R +++ b/R/monolixNlmixr2est.R @@ -237,7 +237,7 @@ if (!exists("parHistData", .ret$env)) { .tmp <- .ret$ui$monolixParHistory if (is.null(.tmp)) { - .minfo("monolix parameter history needs expoted charts, please export charts") + .minfo("monolix parameter history needs exported charts, please export charts") } else { .tmp$type <- "Unscaled" assign("parHistData", .tmp, .ret$env) @@ -303,7 +303,7 @@ .tmp <- .ret$ui$monolixParHistory assign("message", paste(.msg$message, collapse="\n "), envir=.ret$env) if (is.null(.tmp)) { - .minfo("monolix parameter history needs expoted charts, please export charts") + .minfo("monolix parameter history needs exported charts, please export charts") } else { .tmp$type <- "Unscaled" assign("parHistData", .tmp, .ret$env) diff --git a/inst/WORDLIST b/inst/WORDLIST index 6fa6642d..a8c7cd8b 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,15 +1,22 @@ +Babelmixr CMD +CWRES Cmax +CodeFactor +Codecov DV +ETAs ISCALE Iaccept Isample MAPINTER Monolix +Monolix’ NCA NOABORT NONMEM NONMEM's +ODEs PKNCA PKNCAresults PreciseSums @@ -17,16 +24,19 @@ RxODE SAEM Tmax UI +VPC +addl adm advan al amtu -api babelmixr bblDatToMonolix +bioavailability cancelled clearanceu cmax +cov dn doi dvu @@ -36,24 +46,29 @@ evid exploratoryAutoStop fim firstStage +focei foceiFit foceiPreProcessData -https +ie +iwres ka -lixoft lixoftConnectors -lixoftconnectors +lixoftConnectors’ maxeval monolix mrgsolve nca nlmixr +nlmixr's nlmixrDataToMrgsolve nlmixrDataToNonmem nlmixrDataToRxode +nlmixrMuDerCov nmfe nonmem +objf pharmacokinetic +pknca posthoc psp rxControl @@ -61,6 +76,7 @@ rxode saem sigdig sigl +tableControl th timeu tmax @@ -69,3 +85,5 @@ unitless vc volumeu vp +vpc +warfarin diff --git a/vignettes/articles/running-monlix.Rmd b/vignettes/articles/running-monlix.Rmd index 6cd68d16..435a6c3d 100644 --- a/vignettes/articles/running-monlix.Rmd +++ b/vignettes/articles/running-monlix.Rmd @@ -32,7 +32,7 @@ To use `Monolix` with nlmixr2, you do not need to change your data or your You do need to setup how to run `Monolix`. If you have setup the `lixoftConnectors` package from Monolix, no further setup is needed. Instead if you run `Monolix` from the command line for grid processing -(for example) you can figure out the command to run `Monlix` (it is +(for example) you can figure out the command to run `Monolix` (it is often useful to use the full command path and set it in the options, ie `options("babelmixr2.monolix"="monolix")` or use `monolixControl(runCommand="monolix")`. If needed, I prefer the @@ -107,7 +107,7 @@ fit <- nlmixr(pk.turnover.emax3, nlmixr2data::warfarin, "monolix", This fit issues an informational tidbit - -- monolix parameter history needs expoted charts, please export charts +- monolix parameter history needs exported charts, please export charts This will automatically be generated as well when `lixoftConnectors` package is generated and you have a recent version of Monolix. If you @@ -171,7 +171,7 @@ v1s v2s ``` -# Notes about Monlix data translation +# Notes about Monolix data translation The input dataset expected to be compatible with `rxode2` or `nlmixr2`. This dataset is then converted to Monolix format: @@ -184,13 +184,13 @@ The input dataset expected to be compatible with `rxode2` or - `babelmixr2` also creates a macro for each type of dosing: - - Bolus/infusion uses `depot()` and adds modeled lag time (`Tlag`) or bioavailibilty (`p`) if specified + - Bolus/infusion uses `depot()` and adds modeled lag time (`Tlag`) or bioavailability (`p`) if specified - Modeled rate uses `depot()` with `Tk0=amtDose/rate`. `babelmixr2` - also adds modeled lag time (`Tlag`) or bioavailibilty (`p`) if + also adds modeled lag time (`Tlag`) or bioavailability (`p`) if specified - Modeled duration uses `depot()` with `Tk0=dur`, also add adds - modeled lag time (`Tlag`) or bioavailibilty (`p`) if specified + modeled lag time (`Tlag`) or bioavailability (`p`) if specified Turning off a compartment uses empty macro From 93b033895af19f91010d5fa6c2d837b7c7256ddd Mon Sep 17 00:00:00 2001 From: Bill Denney Date: Sat, 21 Oct 2023 10:28:48 -0400 Subject: [PATCH 2/2] Fix pkncaControl missing argument --- R/pknca.R | 1 + man/pkncaControl.Rd | 2 ++ 2 files changed, 3 insertions(+) diff --git a/R/pknca.R b/R/pknca.R index f6178b4d..22c98df4 100644 --- a/R/pknca.R +++ b/R/pknca.R @@ -395,6 +395,7 @@ ini_transform <- function(x, ..., envir = parent.frame()) { #' @param ncaResults Already computed NCA results (a PKNCAresults object) to #' bypass automatic calculations. At least the following parameters must be #' calculated in the NCA: tmax, cmax.dn, cl.last +#' @param rxControl Control options sent to `rxode2::rxControl()` #' @return A list of parameters #' @export pkncaControl <- function(concu = NA_character_, doseu = NA_character_, timeu = NA_character_, diff --git a/man/pkncaControl.Rd b/man/pkncaControl.Rd index e5cddfe8..1fc48fdf 100644 --- a/man/pkncaControl.Rd +++ b/man/pkncaControl.Rd @@ -48,6 +48,8 @@ when a subset of the original data are informative for NCA.} \item{ncaResults}{Already computed NCA results (a PKNCAresults object) to bypass automatic calculations. At least the following parameters must be calculated in the NCA: tmax, cmax.dn, cl.last} + +\item{rxControl}{Control options sent to `rxode2::rxControl()`} } \value{ A list of parameters