diff --git a/NEWS.md b/NEWS.md index 249e0f4..2b47a0a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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` diff --git a/R/def2ini.R b/R/def2ini.R index b212b29..60854ad 100644 --- a/R/def2ini.R +++ b/R/def2ini.R @@ -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