Skip to content

Commit 857f352

Browse files
authored
Merge pull request #175 from nlmixr2/174-omegap-should-be-ignored-at-this-point
ignore omegap records
2 parents 7c1e351 + 873e447 commit 857f352

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050

5151
- uses: r-lib/actions/setup-r-dependencies@v2
5252
with:
53-
cache-version: 3
53+
cache-version: 4
5454
pak-version: devel
5555
extra-packages: |
5656
any::rcmdcheck

.github/workflows/test-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- uses: r-lib/actions/setup-r-dependencies@v2
2525
with:
26-
cache-version: 2
26+
cache-version: 3
2727
pak-version: devel
2828
extra-packages: |
2929
any::covr

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# nonmem2rx (development version)
22

3+
* Omega and Sigma prior estimates are currently ignored
4+
35
* Read all NONMEM files using latin1 encoding to allow single byte
46
parser to work
57

R/records.R

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@
1414
sub="sub", # $subroutines
1515
abb="abb", # $abbrevited
1616
pre="pre", # $pred
17-
the="the", # $theta
17+
the="the", # $heta
1818
thetap="thetap", #thetap
1919
thetapv="thetapv", # thetapv
2020
ome="ome", # $omega
21+
omegap="omegap", #omegap
22+
omegapd="omegapd", # omegapd
2123
sig="sig", # $sigma
24+
sigmap="sigmap", #sigmap
25+
sigmapd="sigmapd", # sigmapd
2226
msf="msf", # $msfi
2327
sim="sim", # $simulation
2428
est="est", # $estimation
@@ -47,11 +51,15 @@
4751
sub="$SUBROUTINES", # $subroutines
4852
abb="$ABBREVITED", # $abbrevited
4953
pre="$PRED", # $pred
50-
the="$THETA", # $theta
54+
the="$gTHETA", # $theta
5155
thetap="$THETAP", # $thetap
5256
thetapv="$THETAPV", # $thetapv
5357
ome="$OMEGA", # $omega
58+
omegap="$OMEGAP", # $omegap
59+
omegapd="$OMEGAPD", # $omegapd
5460
sig="$SIGMA", # $sigma
61+
sigmap="$SIGMAP", # $sigmap
62+
sigmapd="$SIGMAPD", # $sigmapd
5563
msf="$MSFI", # $msfi
5664
mix="$MIX",
5765
sim="$SIMULATION", # $simulation
@@ -87,9 +95,9 @@
8795
.rec <- tolower(rec)
8896
.ret <- .transRecords[.rec]
8997
if (is.na(.ret)) {
90-
if (.rec == "thetap") {
91-
.ret <- .transRecords[.rec]
92-
} else if (.rec == "thetapv") {
98+
if (.rec %in% c("thetap", "thetapv",
99+
"omegap", "omegapd",
100+
"sigmap", "sigmapd")) {
93101
.ret <- .transRecords[.rec]
94102
} else {
95103
.rec0 <- substr(.rec, 1, 3)

tests/testthat/test-bauer-2019.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,13 @@ if (identical(Sys.getenv("NOT_CRAN"), "true")) {
3737
})
3838
})
3939

40+
withr::with_options(list(nonmem2rx.save=FALSE, nonmem2rx.load=FALSE, nonmem2rx.overwrite=FALSE,
41+
nonmem2rx.extended=FALSE), {
42+
rx <- nonmem2rx(system.file("mods/bauer_2019_cptpsp_tutorial_2/supp2/504_nuts.ctl",
43+
package="nonmem2rx"))
44+
45+
expect_true(dim(rx$omega)[1] == 2)
46+
})
47+
4048

4149
}

0 commit comments

Comments
 (0)