Skip to content

Commit

Permalink
Increment model number and create new enviroment when using `babel.po…
Browse files Browse the repository at this point in the history
…ped.database`
  • Loading branch information
mattfidler committed Oct 18, 2024
1 parent e2beb1b commit c724eea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/poped.R
Original file line number Diff line number Diff line change
Expand Up @@ -3042,7 +3042,13 @@ babel.poped.database <- function(popedInput, ..., optTime=NA) {
if (is.environment(popedInput$babelmixr2)) {
.babelmixr2 <- popedInput$babelmixr2
.db <- PopED::create.poped.database(popedInput=popedInput, ...)
.db$babelmixr2 <- .babelmixr2
.b2 <- new.env(parent=emptyenv())
for (v in ls(envir=.babelmixr2, all=TRUE)) {
assign(v, get(v, envir=.babelmixr2), envir=.b2)
}
.b2$modelNumber <- .poped$modelNumber
.poped$modelNumber <- .poped$modelNumber + 1
.db$babelmixr2 <- .b2
if (is.logical(optTime) && length(optTime) == 1L &&
!is.na(optTime)) {
popedMultipleEndpointResetTimeIndex()
Expand Down

0 comments on commit c724eea

Please sign in to comment.