Skip to content

Commit

Permalink
Merge pull request #19 from nlmixr2/19-rxCov_not-in-ini
Browse files Browse the repository at this point in the history
rxCov_ variables should not be included in the ini({}) block
  • Loading branch information
mattfidler authored Sep 24, 2024
2 parents 35cbaae + 30d89b7 commit be77718
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# monolix2rx (development version)

* For initial conditions starting with `rxCov_` don't add to ini

# monolix2rx 0.0.2

* Remove `rxode2parse` `LinkingTo`
Expand Down
16 changes: 12 additions & 4 deletions R/def2ini.R
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,21 @@
.env$pars <- pars
lapply(names(longDef$fixed),
function(v) {
.env$pars <- rbind(.env$pars,
data.frame(name=v, value=longDef$fixed[v], method="FIXED"))
if (nchar(v) >= 6 &&
substr(v, 1, 6) == "rxCov_") {
} else {
.env$pars <- rbind(.env$pars,
data.frame(name=v, value=longDef$fixed[v], method="FIXED"))
}
})
lapply(names(def$fixed),
function(v) {
.env$pars <- rbind(.env$pars,
data.frame(name=v, value=def$fixed[v], method="FIXED"))
if (nchar(v) >= 6 &&
substr(v, 1, 6) == "rxCov_") {
} else {
.env$pars <- rbind(.env$pars,
data.frame(name=v, value=def$fixed[v], method="FIXED"))
}
})
pars <- .env$pars
.var <- def$var
Expand Down

0 comments on commit be77718

Please sign in to comment.