Skip to content

Commit

Permalink
Add deparse to all estimation methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Sep 16, 2024
1 parent af438f7 commit af9aa5a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/monolixControl.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ monolixControl <- function(nbSSDoses=7,
.ret
}

rxUiDeparse.monolixControl <- function(object, var) {
.default <- monolixControl()
.w <- nlmixr2est::.deparseDifferent(.default, object, "genRxControl")
nlmixr2est::.deparseFinal(.default, object, .w, var)
}

.monolixControlToFoceiControl <- function(env, assign = TRUE) {
.monolixControl <- env$monolixControl
.ui <- env$ui
Expand Down
7 changes: 7 additions & 0 deletions R/nonmemControl.R
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,13 @@ nonmemControl <- function(est=c("focei", "imp", "its", "posthoc"),
.ret
}

rxUiDeparse.nonmemControl <- function(object, var) {
.default <- nonmemControl()
.w <- nlmixr2est::.deparseDifferent(.default, object, "genRxControl")
nlmixr2est::.deparseFinal(.default, object, .w, var)
}


#' @export
getValidNlmixrCtl.nonmem <- function(control) {
.ctl <- control[[1]]
Expand Down
7 changes: 7 additions & 0 deletions R/pknca.R
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,13 @@ pkncaControl <- function(concu = NA_character_, doseu = NA_character_, timeu = N
)
}

rxUiDeparse.pkncaControl <- function(object, var) {
.default <- pkncaControl()
.w <- nlmixr2est::.deparseDifferent(.default, object, "genRxControl")
nlmixr2est::.deparseFinal(.default, object, .w, var)
}


#' @export
getValidNlmixrCtl.pknca <- function(control) {
orig <- control
Expand Down
7 changes: 7 additions & 0 deletions R/poped.R
Original file line number Diff line number Diff line change
Expand Up @@ -2896,6 +2896,13 @@ popedControl <- function(stickyRecalcN=4,
.ret
}

rxUiDeparse.popedControl <- function(object, var) {
.default <- popedControl()
.w <- nlmixr2est::.deparseDifferent(.default, object, "genRxControl")
nlmixr2est::.deparseFinal(.default, object, .w, var)
}



.popedFamilyControl <- function(env, ...) {
.ui <- env$ui
Expand Down
4 changes: 4 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ rxode2.api <- names(rxode2::.rxode2ptrs())
rxode2::.s3register("nlmixr2est::nmObjGetFoceiControl", "monolix")
rxode2::.s3register("nlmixr2est::nmObjHandleControlObject", "monolixControl")
rxode2::.s3register("nlmixr2est::nlmixr2", "pkncaEst")
rxode2::.s3register("rxode2::rxUiDeparse", "monolixControl")
rxode2::.s3register("rxode2::rxUiDeparse", "nonmemControl")
rxode2::.s3register("rxode2::rxUiDeparse", "pkncaControl")
rxode2::.s3register("rxode2::rxUiDeparse", "popedControl")
.iniRxode2Ptr()
}

0 comments on commit af9aa5a

Please sign in to comment.