Error(s) in re-building vignettes:
  ...
--- re-building ‘running_nlmixr.Rmd’ using rmarkdown
Warning in engine$weave(file, quiet = quiet, encoding = enc) :
  Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.

 *** caught segfault ***
address 18, cause 'memory not mapped'

Traceback:
 1: foceiFitCpp_(.ret)
 2: doTryCatch(return(expr), name, parentenv, handler)
 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 4: tryCatchList(expr, classes, parentenv, handlers)
 5: tryCatch({    foceiFitCpp_(.ret)}, error = function(e) {    if (regexpr("theta reset", e$message) != -1) {        assign("err", "theta reset", this.env)    }    else {        assign("err", e$message, this.env)    }})
 6: .fitFun(.ret)
 7: doTryCatch(return(expr), name, parentenv, handler)
 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 9: tryCatchList(expr, classes, parentenv, handlers)
10: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
11: try(.fitFun(.ret))
12: (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL,     lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL,     control = foceiControl(), thetaNames = NULL, etaNames = NULL,     etaMat = NULL, ..., env = NULL) {    set.seed(control$seed)    RxODE::rxSolveFree()    freeFocei()    on.exit({        RxODE::rxSolveFree()        freeFocei()    })    .pt <- proc.time()    loadNamespace("n1qn1")    if (!RxODE::rxIs(control, "foceiControl")) {        control <- do.call(foceiControl, control)    }    if (is.null(env))         .ret <- new.env(parent = emptyenv())    else .ret <- env    .ret$origData <- data    .ret$etaNames <- etaNames    .ret$thetaFixed <- fixed    .ret$control <- control    .ret$control$focei.mu.ref <- integer(0)    if (is(model, "RxODE") || is(model, "character")) {        .ret$ODEmodel <- TRUE        if (class(pred) != "function") {            stop("pred must be a function specifying the prediction variables in this model.")        }    }    else {        .ret$ODEmodel <- TRUE        model <- constructLinCmt(PKpars)        pred <- eval(parse(text = "function(){return(Central);}"))    }    .square <- function(x) x * x    .ret$diagXformInv = c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform]    if (is.null(err)) {        err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]],             collapse = ""), "}")))    }    .covNames <- .parNames <- c()    .ret$adjLik <- control$adjLik    if (!exists("noLik", envir = .ret)) {        .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state))        .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state))        .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars,             err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE,             sum.prod = control$sumProd, theta.derivs = FALSE,             optExpression = control$optExpression, interaction = (control$interaction ==                 1L), run.internal = TRUE)        if (!is.null(.ret$model$inner)) {            .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) -                 length(.atol)))            .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) -                 length(.rtol)))            .ret$control$rxControl$atol <- .atol            .ret$control$rxControl$rtol <- .rtol        }        .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only)        .covNames <- .covNames[regexpr(rex::rex(start, or("THETA",             "ETA"), "[", numbers, "]", end), .covNames) == -1]        colnames(data) <- sapply(names(data), function(x) {            if (any(x == .covNames)) {                return(x)            }            else {                return(toupper(x))            }        })        .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)),             RxODE::rxLhs(.ret$model$pred.only))        if (length(.lhs) > 0) {            .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs),                 end), .covNames) == -1]        }        if (length(.covNames) > 0) {            if (!all(.covNames %in% names(data))) {                message("Model:")                RxODE::rxCat(.ret$model$pred.only)                message("Needed Covariates:")                nlmixrPrint(.covNames)                stop("Not all the covariates are in the dataset.")            }            message("Needed Covariates:")            print(.covNames)        }        .extraPars <- .ret$model$extra.pars    }    else {        if (.ret$noLik) {            .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state))            .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state))            .ret$model <- RxODE::rxSymPySetupPred(model, pred,                 PKpars, err, grad = (control$derivMethod == 2L),                 pred.minus.dv = TRUE, sum.prod = control$sumProd,                 theta.derivs = FALSE, optExpression = control$optExpression,                 run.internal = TRUE, only.numeric = TRUE)            if (!is.null(.ret$model$inner)) {                .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) -                   length(.atol)))                .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) -                   length(.rtol)))                .ret$control$rxControl$atol <- .atol                .ret$control$rxControl$rtol <- .rtol            }            .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only)            .covNames <- .covNames[regexpr(rex::rex(start, or("THETA",                 "ETA"), "[", numbers, "]", end), .covNames) ==                 -1]            colnames(data) <- sapply(names(data), function(x) {                if (any(x == .covNames)) {                  return(x)                }                else {                  return(toupper(x))                }            })            .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)),                 RxODE::rxLhs(.ret$model$pred.only))            if (length(.lhs) > 0) {                .covNames <- .covNames[regexpr(rex::rex(start,                   or(.lhs), end), .covNames) == -1]            }            if (length(.covNames) > 0) {                if (!all(.covNames %in% names(data))) {                  message("Model:")                  RxODE::rxCat(.ret$model$pred.only)                  message("Needed Covariates:")                  nlmixrPrint(.covNames)                  stop("Not all the covariates are in the dataset.")                }                message("Needed Covariates:")                print(.covNames)            }            .extraPars <- .ret$model$extra.pars        }        else {            .extraPars <- NULL        }    }    .ret$skipCov <- skipCov    if (is.null(skipCov)) {        if (is.null(fixed)) {            .tmp <- rep(FALSE, length(inits$THTA))        }        else {            if (length(fixed) < length(inits$THTA)) {                .tmp <- c(fixed, rep(FALSE, length(inits$THTA) -                   length(fixed)))            }            else {                .tmp <- fixed[1:length(inits$THTA)]            }        }        if (exists("uif", envir = .ret)) {            .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)]            .uifErr <- sapply(.uifErr, function(x) {                if (is.na(x))                   return(FALSE)                return(!any(x == c("pow2", "tbs", "tbsYj")))            })            .tmp <- (.tmp | .uifErr)        }        .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars)))        .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref    }    if (is.null(.extraPars)) {        .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)))    }    else {        .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)),             sprintf("ERR[%s]", seq_along(.extraPars)))    }    if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) ==         length(thetaNames)) {        .nms <- thetaNames    }    .ret$thetaNames <- .nms    if (length(lower) == 1) {        lower <- rep(lower, length(inits$THTA))    }    else if (length(lower) != length(inits$THTA)) {        print(inits$THTA)        print(lower)        stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.")    }    if (length(upper) == 1) {        upper <- rep(upper, length(inits$THTA))    }    else if (length(lower) != length(inits$THTA)) {        stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.")    }    if (!is.null(.extraPars)) {        .ret$model$extra.pars <- eval(call(control$diagXform,             .ret$model$extra.pars))        if (length(.ret$model$extra.pars) > 0) {            inits$THTA <- c(inits$THTA, .ret$model$extra.pars)            .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars))            .upperErr <- rep(Inf, length(.ret$model$extra.pars))            lower <- c(lower, .lowerErr)            upper <- c(upper, .upperErr)        }    }    if (is.null(data$ID))         stop("\"ID\" not found in data")    if (is.null(data$DV))         stop("\"DV\" not found in data")    if (is.null(data$EVID))         data$EVID = 0    if (is.null(data$AMT))         data$AMT = 0    for (.v in c("TIME", "AMT", "DV", .covNames)) data[[.v]] <- as.double(data[[.v]])    .ret$dataSav = data    .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME",         "AMT", "EVID", .covNames)]    data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME",         "DV", "EVID", .covNames)]    .w <- which(!(names(.ret$dataSav) %in% .covNames))    names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w]))    .lh = .parseOM(inits$OMGA)    .nlh = sapply(.lh, length)    .osplt = rep(1:length(.lh), .nlh)    .lini = list(inits$THTA, unlist(.lh))    .nlini = sapply(.lini, length)    .nsplt = rep(1:length(.lini), .nlini)    .om0 = .genOM(.lh)    if (length(etaNames) == dim(.om0)[1]) {        .ret$etaNames <- .ret$etaNames    }    else {        .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1]))    }    .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform)    .ret$xType <- .ret$rxInv$xType    .om0a <- .om0    .om0a <- .om0a/control$diagOmegaBoundLower    .om0b <- .om0    .om0b <- .om0b * control$diagOmegaBoundUpper    .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform)    .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform)    .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta,         b = .om0b$theta, diag = .om0a$theta.diag)    .omdf$lower <- with(.omdf, ifelse(a > b, b, a))    .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower))    .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower))    .omdf$upper <- with(.omdf, ifelse(a < b, b, a))    .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper))    .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper))    lower <- c(lower, .omdf$lower)    upper <- c(upper, .omdf$upper)    .ret$lower <- lower    .ret$upper <- upper    .ret$thetaIni <- inits$THTA    .scaleC <- double(length(lower))    if (is.null(control$scaleC)) {        .scaleC <- rep(NA_real_, length(lower))    }    else {        .scaleC <- as.double(control$scaleC)        if (length(lower) > length(.scaleC)) {            .scaleC <- c(.scaleC, rep(NA_real_, length(lower) -                 length(.scaleC)))        }        else if (length(lower) < length(.scaleC)) {            .scaleC <- .scaleC[seq(1, length(lower))]            warning("scaleC control option has more options than estimated population parameters, please check.")        }    }    .ret$scaleC <- .scaleC    if (exists("uif", envir = .ret)) {        .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err),             c("est", "err", "ntheta")]        for (.i in seq_along(.ini$err)) {            if (is.na(.ret$scaleC[.ini$ntheta[.i]])) {                if (any(.ini$err[.i] == c("boxCox", "yeoJohnson",                   "pow2", "tbs", "tbsYj"))) {                  .ret$scaleC[.ini$ntheta[.i]] <- 1                }                else if (any(.ini$err[.i] == c("prop", "add",                   "norm", "dnorm", "logn", "dlogn", "lnorm",                   "dlnorm"))) {                  .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i])                }            }        }        for (.i in .ini$model$extraProps$powTheta) {            if (is.na(.ret$scaleC[.i]))                 .ret$scaleC[.i] <- 1        }        .ini <- as.data.frame(.ret$uif$ini)        for (.i in .ini$model$extraProps$factorial) {            if (is.na(.ret$scaleC[.i]))                 .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] +                   1))        }        for (.i in .ini$model$extraProps$gamma) {            if (is.na(.ret$scaleC[.i]))                 .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i]))        }        for (.i in .ini$model$extraProps$log) {            if (is.na(.ret$scaleC[.i]))                 .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i])        }    }    names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni))    if (is.null(etaMat) & !is.null(control$etaMat)) {        .ret$etaMat <- control$etaMat    }    else {        .ret$etaMat <- etaMat    }    .ret$setupTime <- (proc.time() - .pt)["elapsed"]    if (exists("uif", envir = .ret)) {        .tmp <- .ret$uif$logThetasList        .ret$logThetas <- .tmp[[1]]        .ret$logThetasF <- .tmp[[2]]    }    else {        .ret$logThetasF <- integer(0)    }    if (exists("noLik", envir = .ret)) {        if (!.ret$noLik) {            .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)),                 sprintf("ETA[%d]", seq(1, dim(.om0)[1])))            .ret$.thetan <- length(.ret$thetaIni)            .ret$nobs <- sum(data$EVID == 0)        }    }    .ret$control$printTop <- TRUE    .ret$control$nF <- 0    .est0 <- .ret$thetaIni    .fitFun <- function(.ret) {        this.env <- environment()        assign("err", "theta reset", this.env)        while (this.env$err == "theta reset") {            assign("err", "", this.env)            RxODE::rxSolveFree()            freeFocei()            .ret0 <- tryCatch({                foceiFitCpp_(.ret)            }, error = function(e) {                if (regexpr("theta reset", e$message) != -1) {                  assign("err", "theta reset", this.env)                }                else {                  assign("err", e$message, this.env)                }            })            if (this.env$err == "theta reset") {                .nm <- names(.ret$thetaIni)                .ret$thetaIni <- setNames(.thetaReset$thetaIni +                   0, .nm)                .ret$rxInv$theta <- .thetaReset$omegaTheta                .ret$control$printTop <- FALSE                .ret$etaMat <- .thetaReset$etaMat                .ret$control$etaMat <- .thetaReset$etaMat                .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations                .ret$control$nF <- .thetaReset$nF                .ret$control$gillRetC <- .thetaReset$gillRetC                .ret$control$gillRet <- .thetaReset$gillRet                .ret$control$gillRet <- .thetaReset$gillRet                .ret$control$gillDf <- .thetaReset$gillDf                .ret$control$gillDf2 <- .thetaReset$gillDf2                .ret$control$gillErr <- .thetaReset$gillErr                .ret$control$rEps <- .thetaReset$rEps                .ret$control$aEps <- .thetaReset$aEps                .ret$control$rEpsC <- .thetaReset$rEpsC                .ret$control$aEpsC <- .thetaReset$aEpsC                .ret$control$c1 <- .thetaReset$c1                .ret$control$c2 <- .thetaReset$c2                message("Theta reset")            }        }        if (this.env$err != "") {            stop(this.env$err)        }        else {            return(.ret0)        }    }    .ret0 <- try(.fitFun(.ret))    .n <- 1    while (inherits(.ret0, "try-error") && control$maxOuterIterations !=         0 && .n <= control$nRetries) {        message(sprintf("Restart %s", .n))        .ret$control$nF <- 0        .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) -             0.1 * .n        .estNew <- sapply(seq_along(.est0), function(.i) {            if (.ret$thetaFixed[.i]) {                return(.est0[.i])            }            else if (.estNew[.i] < lower[.i]) {                return(lower + (.Machine$double.eps)^(1/7))            }            else if (.estNew[.i] > upper[.i]) {                return(upper - (.Machine$double.eps)^(1/7))            }            else {                return(.estNew[.i])            }        })        .ret$thetaIni <- .estNew        .ret0 <- try(.fitFun(.ret))        .n <- .n + 1    }    if (inherits(.ret0, "try-error"))         stop("Could not fit data.")    .ret <- .ret0    if (!control$calcTables) {        return(.ret)    }    if (exists("parHistData", .ret)) {        .tmp <- .ret$parHistData        .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) !=             "type"]        .iter <- .tmp$iter        .tmp <- .tmp[, names(.tmp) != "iter"]        .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter)        names(.ret$parHistStacked) <- c("val", "par", "iter")        .ret$parHist <- data.frame(iter = .iter, .tmp)    }    .solve <- function(...) {        .ret <- RxODE::rxSolve(...)        if (names(.ret)[1] == "time") {            .ret <- data.frame(ID = 1, .ret)        }        return(.ret)    }    .solvePred <- function() {        .res <- .solve(.ret$model$pred.only, .pars$pred, .ret$dataSav,             returnType = "data.frame", atol = .ret$control$atol[1],             rtol = .ret$control$rtol[1], maxsteps = .ret$control$maxstepsOde,             hmin = .ret$control$hmin, hmax = .ret$control$hmax,             hini = .ret$control$hini, transitAbs = .ret$control$transitAbs,             maxordn = .ret$control$maxordn, maxords = .ret$control$maxords,             method = .ret$control$method)        if (any(is.na(.res$rx_pred_)) && .ret$control$method ==             2L) {            .res <- .solve(.ret$model$pred.only, .pars$pred,                 .ret$dataSav, returnType = "data.frame", atol = .ret$control$atol[1],                 rtol = .ret$control$rtol[1], maxsteps = .ret$control$maxstepsOde *                   2, hmin = .ret$control$hmin, hmax = .ret$control$hmax/2,                 hini = .ret$control$hini, transitAbs = .ret$control$transitAbs,                 maxordn = .ret$control$maxordn, maxords = .ret$control$maxords,                 method = "lsoda")            if (any(is.na(.res$rx_pred_))) {                .res <- .solve(.ret$model$pred.only, .pars$pred,                   .ret$dataSav, returnType = "data.frame", atol = .ret$control$atol[1],                   rtol = .ret$control$rtol[1], maxsteps = .ret$control$maxstepsOde *                     2, hmin = .ret$control$hmin, hmax = .ret$control$hmax/2,                   hini = .ret$control$hini, transitAbs = .ret$control$transitAbs,                   maxordn = .ret$control$maxordn, maxords = .ret$control$maxords,                   method = "dop853")                if (any(is.na(.res$rx_pred_))) {                  warning("Problems solving pred/wres liblsoda, lsoda and dop853")                }                else {                  warning("Problems solving pred/wres liblsoda and lsoda switched to dop853")                }            }            else {                warning("Problems solving pred/wres liblsoda switched to lsoda")            }        }        return(.res)    }    if (exists("noLik", envir = .ret)) {        if (.ret$noLik) {            message("Calculating residuals/tables")            .pt <- proc.time()            .etas <- .ret$ranef            .thetas <- .ret$fixef            .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas,                 .etas)            .preds <- list(ipred = .solve(.ret$model$pred.only,                 .pars$ipred, .ret$dataSav, returnType = "data.frame.TBS",                 atol = .ret$control$atol[1], rtol = .ret$control$rtol[1],                 maxsteps = .ret$control$maxstepsOde, hmin = .ret$control$hmin,                 hmax = .ret$control$hmax, hini = .ret$control$hini,                 transitAbs = .ret$control$TransitAbs, maxordn = .ret$control$maxordn,                 maxords = .ret$control$maxords, method = .ret$control$method),                 pred = .solvePred(), cwres = FALSE)        }        else {            .pt <- proc.time()            .etas <- .ret$ranef            .thetas <- .ret$fixef            .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas,                 .etas)            .ret$shrink <- .Call(`_nlmixr_nlmixrShrink`, .ret$omega,                 .etas, .pars$eta.lst[-(dim(.ret$omega)[1] + 1)])            .updateParFixed(.ret)            return(.ret)        }    }    else {        if (exists("skipTable", envir = .ret)) {            .etas <- .ret$ranef            .thetas <- .ret$fixef            .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas,                 .etas)            .ret$shrink <- .Call(`_nlmixr_nlmixrShrink`, .ret$omega,                 .etas, .pars$eta.lst[-(dim(.ret$omega)[1] + 1)])            .updateParFixed(.ret)            if (.ret$skipTable)                 return(.ret)        }        message("Calculating residuals/tables")        .pt <- proc.time()        .etas <- .ret$ranef        .thetas <- .ret$fixef        .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas)        .preds <- list(ipred = .solve(.ret$model$inner, .pars$ipred,             .ret$dataSav, returnType = "data.frame.TBS", atol = .ret$control$atol[1],             rtol = .ret$control$rtol[1], maxsteps = .ret$control$maxstepsOde,             hmin = .ret$control$hmin, hmax = .ret$control$hmax,             hini = .ret$control$hini, transitAbs = .ret$control$TransitAbs,             maxordn = .ret$control$maxordn, maxords = .ret$control$maxords,             method = .ret$control$method), pred = .solvePred())    }    .lst <- .Call(`_nlmixr_nlmixrResid`, .preds, .ret$omega,         data$DV, data$EVID, .preds$ipred$rxLambda, .preds$ipred$rxYj,         .etas, .pars$eta.lst)    if (is.null(.preds$cwres)) {        .df <- RxODE::rxSolve(.ret$model$pred.only, .pars$ipred,             .ret$dataSav, returnType = "data.frame", hmin = .ret$control$hmin,             hmax = .ret$control$hmax, hini = .ret$control$hini,             transitAbs = .ret$control$transitAbs, maxordn = .ret$control$maxordn,             maxords = .ret$control$maxords, Method = .ret$control$method)[,             -(1:4)]    }    else {        .df <- .preds$ipred[, -c(1:4, length(names(.preds$ipred)) -             0:1), drop = FALSE]    }    .df <- .df[, !(names(.df) %in% c("nlmixr_pred", names(.etas),         names(.thetas)))]    if (any(names(.df) %in% names(.lst[[1]]))) {        warning("Calculated residuals like IPRED are masked by nlmixr calculated values")        .df <- .df[, !(names(.df) %in% names(.lst[[1]]))]    }    if (any(names(.df) %in% names(.lst[[3]]))) {        .df <- .df[, !(names(.df) %in% names(.lst[[3]]))]    }    .lst[[4]] <- .df    .ret$shrink <- .lst[[2]]    .updateParFixed(.ret)    .df <- cbind(as.data.frame(data), .lst[[1]], .lst[[3]], .lst[[4]])    .ret$tableTime <- (proc.time() - .pt)["elapsed"]    .ret$time <- data.frame(.ret$time, table = .ret$tableTime)    .isDplyr <- requireNamespace("dplyr", quietly = TRUE)    if (!.isDplyr) {        .isDataTable <- requireNamespace("data.table", quietly = TRUE)        if (.isDataTable) {            .df <- data.table::data.table(.df)        }    }    else {        .df <- dplyr::as.tbl(.df)    }    .cls <- class(.df)    if (control$interaction) {        .cls <- c(paste0("nlmixr", .ret$method, "i"), "nlmixrFitData",             "nlmixrFitCore", .cls)    }    else {        .cls <- c(paste0("nlmixr", .ret$method), "nlmixrFitData",             "nlmixrFitCore", .cls)    }    class(.ret) <- "nlmixrFitCoreSilent"    attr(.cls, ".foceiEnv") <- .ret    class(.df) <- .cls    message("done.")    return(.df)})(data = dat, inits = init, PKpars = uif$theta.pars, model = uif$rxode.pred,     pred = function() {        return(nlmixr_pred)    }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper,     thetaNames = uif$focei.names, etaNames = uif$eta.names, etaMat = mat,     env = env, skipCov = .skipCov, control = foceiControl(maxOuterIterations = 0,         maxInnerIterations = 0, covMethod = "", cores = 1, sumProd = uif$env$sum.prod))
13: do.call(foceiFit.data.frame0, call, envir = parent.frame(1))
14: withCallingHandlers(expr, warning = function(w) {    assign("ws", unique(c(w$message, ws)), this.env)})
15: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
16: suppressWarnings(withCallingHandlers(expr, warning = function(w) {    assign("ws", unique(c(w$message, ws)), this.env)}))
17: .collectWarnings(do.call(foceiFit.data.frame0, call, envir = parent.frame(1)))
18: foceiFit.data.frame(data = dat, inits = init, PKpars = uif$theta.pars,     model = uif$rxode.pred, pred = function() {        return(nlmixr_pred)    }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper,     thetaNames = uif$focei.names, etaNames = uif$eta.names, etaMat = mat,     env = env, skipCov = .skipCov, control = foceiControl(maxOuterIterations = 0,         maxInnerIterations = 0, covMethod = "", cores = 1, sumProd = uif$env$sum.prod))
19: doTryCatch(return(expr), name, parentenv, handler)
20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
21: tryCatchList(expr, classes, parentenv, handlers)
22: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
23: try(foceiFit.data.frame(data = dat, inits = init, PKpars = uif$theta.pars,     model = uif$rxode.pred, pred = function() {        return(nlmixr_pred)    }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper,     thetaNames = uif$focei.names, etaNames = uif$eta.names, etaMat = mat,     env = env, skipCov = .skipCov, control = foceiControl(maxOuterIterations = 0,         maxInnerIterations = 0, covMethod = "", cores = 1, sumProd = uif$env$sum.prod)))
24: as.focei.nlmixrNlme(fit, uif, pt, data = dat, calcResid = calc.resid)
25: doTryCatch(return(expr), name, parentenv, handler)
26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
27: tryCatchList(expr, classes, parentenv, handlers)
28: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
29: try({    as.focei.nlmixrNlme(fit, uif, pt, data = dat, calcResid = calc.resid)})
30: nlmixr_fit0(uif = uif, data = data, est = est, control = control,     ..., sum.prod = sum.prod, table = table)
31: withCallingHandlers(expr, warning = function(w) {    assign("ws", unique(c(w$message, ws)), this.env)})
32: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
33: suppressWarnings(withCallingHandlers(expr, warning = function(w) {    assign("ws", unique(c(w$message, ws)), this.env)}))
34: .collectWarnings(nlmixr_fit0(uif = uif, data = data, est = est,     control = control, ..., sum.prod = sum.prod, table = table),     TRUE)
35: (function (uif, data, est = NULL, control = list(), ..., sum.prod = FALSE,     table = tableControl(), save = NULL) {    if (is.null(save)) {        save <- getOption("nlmixr.save", FALSE)    }    if (save) {        .modName <- ifelse(is.null(uif$model.name), "", paste0(uif$model.name,             "-"))        if (.modName == ".-")             .modName <- ""        .dataName <- ifelse(is.null(uif$data.name), "", paste0(uif$data.name,             "-"))        if (.dataName == ".-")             .dataName <- ""        .digest <- digest::digest(list(gsub("<-", "=", gsub(" +",             "", uif$fun.txt)), as.data.frame(uif$ini), data,             est, control, sum.prod, table, ..., as.character(utils::packageVersion("nlmixr")),             as.character(utils::packageVersion("RxODE"))))        .saveFile <- file.path(getOption("nlmixr.save.dir", getwd()),             paste0("nlmixr-", .modName, .dataName, est, "-",                 .digest, ".rds"))        if (file.exists(.saveFile)) {            message(sprintf("Loading model already run (%s)",                 .saveFile))            .ret <- readRDS(.saveFile)            return(.ret)        }    }    .ret <- .collectWarnings(nlmixr_fit0(uif = uif, data = data,         est = est, control = control, ..., sum.prod = sum.prod,         table = table), TRUE)    .ws <- .ret[[2]]    .ret <- .ret[[1]]    if (inherits(.ret, "nlmixrFitCore")) {        .env <- .ret$env        .env$warnings <- .ws    }    for (.i in seq_along(.ws)) {        warning(.ws[.i])    }    if (inherits(.ret, "nlmixrFitCore")) {        if (save) {            AIC(.ret)            .env <- .ret$env            .extra <- (proc.time() - .nlmixrTime)["elapsed"] -                 sum(.env$time)            .env$time <- data.frame(.env$time, other = .extra,                 check.names = FALSE)            saveRDS(.ret, file = .saveFile)        }        else {            .env <- .ret$env            .extra <- (proc.time() - .nlmixrTime)["elapsed"] -                 sum(.env$time)            .env$time <- data.frame(.env$time, other = .extra,                 check.names = FALSE)        }    }    return(.ret)})(uif = list(ini = list(ntheta = c(1, 2, 3, NA, NA, NA, 4),     neta1 = c(NA, NA, NA, 1, 2, 3, NA), neta2 = c(NA, NA, NA,     1, 2, 3, NA), name = 1:7, lower = c(-Inf, -Inf, -Inf, -Inf,     -Inf, -Inf, 0), est = c(0.45, 1, 3.45, 0.6, 0.3, 0.1, 0.7    ), upper = c(Inf, Inf, Inf, Inf, Inf, Inf, Inf), fix = c(FALSE,     FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), err = c(NA, NA,     NA, NA, NA, NA, "add"), label = c("Log Ka", "Log Cl", "Log V",     NA, NA, NA, NA), condition = c(NA, NA, NA, "ID", "ID", "ID",     "linCmt()")), model = function () {    ini({        tka <- 0.45        tcl <- 1        tv <- 3.45        eta.ka ~ 0.6        eta.cl ~ 0.3        eta.v ~ 0.1        add.err <- 0.7    })    model({        ka <- exp(tka + eta.ka)        cl <- exp(tcl + eta.cl)        v <- exp(tv + eta.v)        linCmt() ~ add(add.err)    })}, nmodel = list(fun = c("function(){", "    nlmixr_lincmt_ka <- exp(tka + eta.ka)", "    nlmixr_lincmt_cl <- exp(tcl + eta.cl)", "    nlmixr_lincmt_v <- exp(tv + eta.v)", "    ka <- nlmixr_lincmt_ka", "    cl <- nlmixr_lincmt_cl", "    v <- nlmixr_lincmt_v", "    nlmixr_lincmt_pred <- linCmt()", "}"), fun.txt = "        ka <- exp(tka + eta.ka)\n        cl <- exp(tcl + eta.cl)\n        v <- exp(tv + eta.v)\n        linCmt() ~ add(add.err)",     pred = function ()     {        nlmixr_pred <- nlmixr_lincmt_pred    }, error = function ()     {        return(add(add.err))    }, rest = function ()     {        nlmixr_lincmt_ka <- exp(tka + eta.ka)        nlmixr_lincmt_cl <- exp(tcl + eta.cl)        nlmixr_lincmt_v <- exp(tv + eta.v)    }, rxode = "ka=nlmixr_lincmt_ka;\ncl=nlmixr_lincmt_cl;\nv=nlmixr_lincmt_v;\nrx_ka~ka;\nrx_rate~0;\nrx_dur~0;\nrx_tlag~0;\nrx_tlag2~0;\nrx_F~1;\nrx_F2~1;\nrx_v~v;\nrx_k~cl/v;\nrx_alpha~rx_k;\nrx_A~rx_ka/(rx_ka-rx_alpha)/rx_v;\nrx_A2~1.0/rx_v;\nrx_beta~0;\nrx_B~0;\nrx_B2~0;\nrx_gamma~0;\nrx_C~0;\nrx_C2~0;\nnlmixr_lincmt_pred=solveLinB(rx__PTR__,t,0,rx_A,rx_A2,rx_alpha,rx_B,rx_B2,rx_beta,rx_C,rx_C2,rx_gamma,rx_ka,rx_tlag,rx_tlag2,rx_F,rx_F2,rx_rate,rx_dur);\n",     all.vars = c("tka", "eta.ka", "tcl", "eta.cl", "tv", "eta.v",     "add.err"), rest.vars = c("tka", "eta.ka", "tcl", "eta.cl",     "tv", "eta.v"), all.names = c("ka", "tka", "eta.ka", "cl",     "tcl", "eta.cl", "v", "tv", "eta.v", "add.err"), all.funs = c("(",     "{", "<-", "exp", "+", "~", "linCmt", "add"), all.lhs = c("ka",     "cl", "v"), all.covs = character(0), saem.all.covs = character(0),     saem.inPars = character(0), errs.specified = NULL, add.prop.errs = list(        y = integer(0), add = logical(0), prop = logical(0)),     grp.fn = function ()     {        return("Y00")    }, mu.ref = list(eta.ka = "tka", eta.cl = "tcl", eta.v = "tv"),     cov.ref = list(), cov.theta = NULL, saem.pars = function ()     {        nlmixr_lincmt_ka = exp(tka)        nlmixr_lincmt_cl = exp(tcl)        nlmixr_lincmt_v = exp(tv)    }, nlme.mu.fun = function ()     {        nlmixr_lincmt_ka = exp(tka)        nlmixr_lincmt_cl = exp(tcl)        nlmixr_lincmt_v = exp(tv)    }, nlme.mu.fun2 = function ()     {        nlmixr_lincmt_ka = exp(tka)        nlmixr_lincmt_cl = exp(tcl)        nlmixr_lincmt_v = exp(tv)    }, log.theta = c("tka", "tcl", "tv"), log.eta = c("eta.ka",     "eta.cl", "eta.v"), theta.ord = c("tka", "tcl", "tv"), saem.theta.trans = c(1L,     2L, 3L, NA), predDf = list(cond = "linCmt()", var = "nlmixr_lincmt_pred",         dvid = 1L, cmt = 1L), predSaem = function ()     {        nlmixr_lincmt_pred    }, env = <environment>, predSys = FALSE, noMuEtas = character(0),     saemErr = "", cmtEndpoints = character(0), extra = character(0),     lin.solved = TRUE, model.name = "one.cmt", data.name = "theo_sd"),     meta = <environment>), data = list(ID = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L), TIME = c(0, 0, 0.25, 0.57, 1.12, 2.02, 3.82, 5.1, 7.03, 9.05, 12.12, 24.37, 0, 0, 0.27, 0.52, 1, 1.92, 3.5, 5.02, 7.03, 9, 12, 24.3, 0, 0, 0.27, 0.58, 1.02, 2.02, 3.62, 5.08, 7.07, 9, 12.15, 24.17, 0, 0, 0.35, 0.6, 1.07, 2.13, 3.5, 5.02, 7.02, 9.02, 11.98, 24.65, 0, 0, 0.3, 0.52, 1, 2.02, 3.5, 5.02, 7.02, 9.1, 12, 24.35, 0, 0, 0.27, 0.58, 1.15, 2.03, 3.57, 5, 7, 9.22, 12.1, 23.85, 0, 0, 0.25, 0.5, 1.02, 2.02, 3.48, 5, 6.98, 9, 12.05, 24.22, 0, 0, 0.25, 0.52, 0.98, 2.02, 3.53, 5.05, 7.15, 9.07, 12.1, 24.12, 0, 0, 0.3, 0.63, 1.05, 2.02, 3.53, 5.02, 7.17, 8.8, 11.6, 24.43, 0, 0, 0.37, 0.77, 1.02, 2.05, 3.55, 5.05, 7.08, 9.38, 12.1, 23.7, 0, 0, 0.25, 0.5, 0.98, 1.98, 3.6, 5.02, 7.03, 9.03, 12.12, 24.08, 0, 0, 0.25, 0.5, 1, 2, 3.52, 5.07, 7.07, 9.03, 12.05, 24.15), DV = c(0, 0.74, 2.84, 6.57, 10.5, 9.66, 8.58, 8.36, 7.47, 6.89, 5.94, 3.28, 0, 0, 1.72, 7.91, 8.31, 8.33, 6.85, 6.08, 5.4, 4.55, 3.01, 0.9, 0, 0, 4.4, 6.9, 8.2, 7.8, 7.5, 6.2, 5.3, 4.9, 3.7, 1.05, 0, 0, 1.89, 4.6, 8.6, 8.38, 7.54, 6.88, 5.78, 5.33, 4.19, 1.15, 0, 0, 2.02, 5.63, 11.4, 9.33, 8.74, 7.56, 7.09, 5.9, 4.37, 1.57, 0, 0, 1.29, 3.08, 6.44, 6.32, 5.53, 4.94, 4.02, 3.46, 2.78, 0.92, 0, 0.15, 0.85, 2.35, 5.02, 6.58, 7.09, 6.66, 5.25, 4.39, 3.53, 1.15, 0, 0, 3.05, 3.05, 7.31, 7.56, 6.59, 5.88, 4.73, 4.57, 3, 1.25, 0, 0, 7.37, 9.03, 7.14, 6.33, 5.66, 5.67, 4.24, 4.11, 3.16, 1.12, 0, 0.24, 2.89, 5.22, 6.41, 7.83, 10.21, 9.18, 8.02, 7.14, 5.68, 2.42, 0, 0, 4.86, 7.24, 8, 6.81, 5.87, 5.22, 4.45, 3.62, 2.69, 0.86, 0, 0, 1.25, 3.96, 7.82, 9.72, 9.75, 8.57, 6.59, 6.11, 4.57, 1.17), AMT = c(319.992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 318.56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319.365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319.88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319.956, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319.77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319.365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 267.84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320.1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319.8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320.65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), EVID = c(101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 101L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), CMT = c(1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), WT = c(79.6, 79.6, 79.6, 79.6, 79.6, 79.6, 79.6, 79.6, 79.6, 79.6, 79.6, 79.6, 72.4, 72.4, 72.4, 72.4, 72.4, 72.4, 72.4, 72.4, 72.4, 72.4, 72.4, 72.4, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 72.7, 72.7, 72.7, 72.7, 72.7, 72.7, 72.7, 72.7, 72.7, 72.7, 72.7, 72.7, 54.6, 54.6, 54.6, 54.6, 54.6, 54.6, 54.6, 54.6, 54.6, 54.6, 54.6, 54.6, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 64.6, 64.6, 64.6, 64.6, 64.6, 64.6, 64.6, 64.6, 64.6, 64.6, 64.6, 64.6, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 70.5, 86.4, 86.4, 86.4, 86.4, 86.4, 86.4, 86.4, 86.4, 86.4, 86.4, 86.4, 86.4, 58.2, 58.2, 58.2, 58.2, 58.2, 58.2, 58.2, 58.2, 58.2, 58.2, 58.2, 58.2, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 60.5, 60.5, 60.5, 60.5, 60.5, 60.5, 60.5, 60.5, 60.5, 60.5, 60.5, 60.5)), est = "nlme")
36: do.call(nlmixr_fit, .args)
37: nlmixr.function(one.cmt, theo_sd, est = "nlme")
38: nlmixr(one.cmt, theo_sd, est = "nlme")
39: eval(expr, envir, enclos)
40: eval(expr, envir, enclos)
41: withVisible(eval(expr, envir, enclos))
42: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,     error = eHandler, message = mHandler)
43: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,     enclos)), warning = wHandler, error = eHandler, message = mHandler))
44: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
45: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,     debug = debug, last = i == length(out), use_try = stop_on_error !=         2L, keep_warning = keep_warning, keep_message = keep_message,     output_handler = output_handler, include_timing = include_timing)
46: evaluate::evaluate(...)
47: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&         options$include) 0L else 2L, output_handler = knit_handlers(options$render,         options))
48: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE,     keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message),     stop_on_error = if (options$error && options$include) 0L else 2L,     output_handler = knit_handlers(options$render, options)))
49: block_exec(params)
50: call_block(x)
51: process_group.block(group)
52: process_group(group)
53: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) {        setwd(wd)        cat(res, sep = "\n", file = output %n% "")        message("Quitting from lines ", paste(current_lines(i),             collapse = "-"), " (", knit_concord$get("infile"),             ") ")    })
54: process_file(text, output)
55: knit(input, text = text, envir = envir, quiet = quiet)
56: knit2html(..., force_v1 = TRUE)
57: (if (grepl("\\.[Rr]md$", file)) knit2html_v1 else if (grepl("\\.[Rr]rst$",     file)) knit2pandoc else knit)(file, encoding = encoding,     quiet = quiet, envir = globalenv(), ...)
58: vweave(...)
59: engine$weave(file, quiet = quiet, encoding = enc)
60: doTryCatch(return(expr), name, parentenv, handler)
61: tryCatchOne(expr, names, parentenv, handlers[[1L]])
62: tryCatchList(expr, classes, parentenv, handlers)
63: tryCatch({    engine$weave(file, quiet = quiet, encoding = enc)    setwd(startdir)    output <- find_vignette_product(name, by = "weave", engine = engine)    if (!have.makefile && vignette_is_tex(output)) {        texi2pdf(file = output, clean = FALSE, quiet = quiet)        output <- find_vignette_product(name, by = "texi2pdf",             engine = engine)    }    outputs <- c(outputs, output)}, error = function(e) {    thisOK <<- FALSE    fails <<- c(fails, file)    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",         file, conditionMessage(e)))})
64: tools:::buildVignettes(dir = "/home/ripley/R/packages/tests32/nlmixr.Rcheck/vign_test/nlmixr",     ser_elibs = "/tmp/RtmpYXaq6Y/file65d21ee42271.rds")
An irrecoverable exception occurred. R is aborting now ...