Skip to content

Commit

Permalink
Merge pull request #118 from nlmixr2/117-move-poped
Browse files Browse the repository at this point in the history
117 move poped
  • Loading branch information
mattfidler authored Sep 7, 2024
2 parents 194d560 + e6ee837 commit 07e7f12
Show file tree
Hide file tree
Showing 17 changed files with 755 additions and 210 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Imports:
qs,
rex,
rxode2
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
LinkingTo:
Expand Down
11 changes: 11 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ S3method(nmObjGetControl,nonmem2rx)
S3method(nmObjGetFoceiControl,monolix)
S3method(nmObjHandleControlObject,monolixControl)
S3method(nmObjHandleControlObject,nonmemControl)
S3method(print,babelmixr2popedScript)
S3method(print,pkncaEst)
S3method(rxUiGet,mlxtran)
S3method(rxUiGet,mlxtranDatafile)
Expand Down Expand Up @@ -117,18 +118,28 @@ S3method(rxUiGet,popedCovd)
S3method(rxUiGet,popedD)
S3method(rxUiGet,popedFErrorFun)
S3method(rxUiGet,popedFfFun)
S3method(rxUiGet,popedFfFunScript)
S3method(rxUiGet,popedFgFun)
S3method(rxUiGet,popedFullRxModel)
S3method(rxUiGet,popedGetEventFun)
S3method(rxUiGet,popedNotfixedBpop)
S3method(rxUiGet,popedNotfixedCovd)
S3method(rxUiGet,popedNotfixedD)
S3method(rxUiGet,popedNotfixedSigma)
S3method(rxUiGet,popedParameters)
S3method(rxUiGet,popedRxmodelBase)
S3method(rxUiGet,popedScriptBeforeCtl)
S3method(rxUiGet,popedSettings)
S3method(rxUiGet,popedSigma)
export(.minfo)
export(.popedF)
export(.popedFree)
export(.popedRxRunSetup)
export(.popedSetup)
export(.popedSolveIdME)
export(.popedSolveIdME2)
export(.popedSolveIdN)
export(.popedSolveIdN2)
export(.popedW)
export(as.nlmixr)
export(as.nlmixr2)
Expand Down
8 changes: 4 additions & 4 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ popedSetup <- function(e, full) {
.Call(`_babelmixr2_popedSetup`, e, full)
}

popedSolveIdN2 <- function(theta, mt, id, totn) {
.Call(`_babelmixr2_popedSolveIdN2`, theta, mt, id, totn)
popedSolveIdN2 <- function(theta, mt, iid, totn) {
.Call(`_babelmixr2_popedSolveIdN2`, theta, mt, iid, totn)
}

popedSolveIdN <- function(theta, mt, id, totn) {
.Call(`_babelmixr2_popedSolveIdN`, theta, mt, id, totn)
popedSolveIdN <- function(theta, mt, iid, totn) {
.Call(`_babelmixr2_popedSolveIdN`, theta, mt, iid, totn)
}

popedSolveIdME <- function(theta, umt, mt, ms, nend, id, totn) {
Expand Down
20 changes: 16 additions & 4 deletions R/nonmemRxUiGetPk.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
.nonmemGetMuNum <- function(theta, ui) {
.nonmemGetMuName <- function(theta, ui) {
.muRefDf <- ui$muRefDataFrame
.iniDf <- ui$iniDf
.w <- which(.muRefDf$theta == theta)
if (length(.w) != 1) return(NA_character_)
.eta <- .muRefDf$eta[.w]
.muRefDf$eta[.w]
}

.nonmemGetMuNum0 <- function(theta, ui) {
.eta <- .nonmemGetMuName(theta, ui)
if (is.na(.eta)) return(NA_real_)
.iniDf <- ui$iniDf
.w <- which(.iniDf$name == .eta)
if (length(.w) != 1) return(NA_character_)
if (length(.w) != 1) return(NA_real_)
.iniDf$neta1[.w]
}

.nonmemGetMuNum <- function(theta, ui) {
.neta <- .nonmemGetMuNum0(theta, ui)
if (is.na(.neta)) return(NA_character_)
.muRef <- rxode2::rxGetControl(ui, "muRef", TRUE)
paste0(ifelse(.muRef, "MU_", "UM_"), .iniDf$neta1[.w])
paste0(ifelse(.muRef, "MU_", "UM_"), .neta)
}

.nonmemGetThetaNum <- function(theta, ui) {
Expand Down
Loading

0 comments on commit 07e7f12

Please sign in to comment.