Skip to content

Commit

Permalink
Merge pull request #154 from nlmixr2/153-nonmem2rx-eta-renaming-is-no…
Browse files Browse the repository at this point in the history
…t-working-correctly

Make sure that theta/eta are always ordered like NONMEM
  • Loading branch information
mattfidler authored Jul 3, 2023
2 parents 3b77fa0 + 0a522fb commit e1e2202
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
default for `solveZero` is changed to `solveZero = TRUE` for
`nonmem2rx` objects.

* Fixed bug for renaming `eta` and `theta` when they are renamed so
that the `ui$iniDf` does not match the `theta#` or `eta#` (Issue
#153)

# nonmem2rx 0.1.1

- Fix internal memory issue (`LTO`, `valgrind` etc)
Expand Down
4 changes: 4 additions & 0 deletions R/nonmem2rx.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,12 @@
if (length(.w) > 0) {
.t <- .t[-.w]
}
.i <- as.numeric(gsub("^theta", "", .t))
.t <- .t[order(.i)]
} else {
.t <- rxui$iniDf$name[which(is.na(rxui$iniDf$ntheta) & rxui$iniDf$neta1 == rxui$iniDf$neta2)]
.i <- as.numeric(gsub("^eta", "", .t))
.t <- .t[order(.i)]
}
.t <- .t[!(.t %in% c("icall", "irep"))]
.w <- which(.n == "")
Expand Down

0 comments on commit e1e2202

Please sign in to comment.