Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore omegap records #175

Merged
merged 4 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 3
cache-version: 4
pak-version: devel
extra-packages: |
any::rcmdcheck
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
cache-version: 3
pak-version: devel
extra-packages: |
any::covr
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# nonmem2rx (development version)

* Omega and Sigma prior estimates are currently ignored

* Read all NONMEM files using latin1 encoding to allow single byte
parser to work

Expand Down
18 changes: 13 additions & 5 deletions R/records.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
sub="sub", # $subroutines
abb="abb", # $abbrevited
pre="pre", # $pred
the="the", # $theta
the="the", # $heta
thetap="thetap", #thetap
thetapv="thetapv", # thetapv
ome="ome", # $omega
omegap="omegap", #omegap
omegapd="omegapd", # omegapd
sig="sig", # $sigma
sigmap="sigmap", #sigmap
sigmapd="sigmapd", # sigmapd
msf="msf", # $msfi
sim="sim", # $simulation
est="est", # $estimation
Expand Down Expand Up @@ -47,11 +51,15 @@
sub="$SUBROUTINES", # $subroutines
abb="$ABBREVITED", # $abbrevited
pre="$PRED", # $pred
the="$THETA", # $theta
the="$gTHETA", # $theta
thetap="$THETAP", # $thetap
thetapv="$THETAPV", # $thetapv
ome="$OMEGA", # $omega
omegap="$OMEGAP", # $omegap
omegapd="$OMEGAPD", # $omegapd
sig="$SIGMA", # $sigma
sigmap="$SIGMAP", # $sigmap
sigmapd="$SIGMAPD", # $sigmapd
msf="$MSFI", # $msfi
mix="$MIX",
sim="$SIMULATION", # $simulation
Expand Down Expand Up @@ -87,9 +95,9 @@
.rec <- tolower(rec)
.ret <- .transRecords[.rec]
if (is.na(.ret)) {
if (.rec == "thetap") {
.ret <- .transRecords[.rec]
} else if (.rec == "thetapv") {
if (.rec %in% c("thetap", "thetapv",
"omegap", "omegapd",
"sigmap", "sigmapd")) {
.ret <- .transRecords[.rec]
} else {
.rec0 <- substr(.rec, 1, 3)
Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/test-bauer-2019.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,13 @@ if (identical(Sys.getenv("NOT_CRAN"), "true")) {
})
})

withr::with_options(list(nonmem2rx.save=FALSE, nonmem2rx.load=FALSE, nonmem2rx.overwrite=FALSE,
nonmem2rx.extended=FALSE), {
rx <- nonmem2rx(system.file("mods/bauer_2019_cptpsp_tutorial_2/supp2/504_nuts.ctl",
package="nonmem2rx"))

expect_true(dim(rx$omega)[1] == 2)
})


}
Loading