CRAN Package Check Results for Package logitr

Last updated on 2025-12-22 23:49:23 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.3 4.35 150.00 154.35 OK
r-devel-linux-x86_64-debian-gcc 1.1.3 3.37 111.68 115.05 OK
r-devel-linux-x86_64-fedora-clang 1.1.3 9.00 238.06 247.06 OK
r-devel-linux-x86_64-fedora-gcc 1.1.3 9.00 260.86 269.86 OK
r-devel-windows-x86_64 1.1.3 10.00 210.00 220.00 OK
r-patched-linux-x86_64 1.1.3 5.23 143.28 148.51 OK
r-release-linux-x86_64 1.1.3 5.31 142.27 147.58 OK
r-release-macos-arm64 1.1.3 1.00 42.00 43.00 ERROR
r-release-macos-x86_64 1.1.3 4.00 179.00 183.00 OK
r-release-windows-x86_64 1.1.3 8.00 199.00 207.00 OK
r-oldrel-macos-arm64 1.1.3 1.00 51.00 52.00 OK
r-oldrel-macos-x86_64 1.1.3 4.00 205.00 209.00 OK
r-oldrel-windows-x86_64 1.1.3 12.00 256.00 268.00 OK

Check Details

Version: 1.1.3
Check: examples
Result: ERROR Running examples in ‘logitr-Ex.R’ failed The error most likely occurred in: > ### Name: logitr > ### Title: The main function for estimating logit models > ### Aliases: logitr > ### Keywords: logit logitr mixed mnl mxl willingness-to-pay wtp > > ### ** Examples > > # For more detailed examples, visit > # https://jhelvy.github.io/logitr/articles/ > > library(logitr) > > # Estimate a MNL model in the Preference space > mnl_pref <- logitr( + data = yogurt, + outcome = "choice", + obsID = "obsID", + pars = c("price", "feat", "brand") + ) Running model... Done! > > # Estimate a MNL model in the WTP space, using a 5-run multistart > mnl_wtp <- logitr( + data = yogurt, + outcome = "choice", + obsID = "obsID", + pars = c("feat", "brand"), + scalePar = "price", + numMultiStarts = 5 + ) Running multistart... Random starting point iterations: 5 Number of cores: 15 *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) Traceback: 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: 11: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) {doTryCatch(return(expr), name, parentenv, handler) 12: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) model$fail <- FALSE 4: model$coefficients <- result$solutiontryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$statustryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] model$message <- result$message }}) 9: 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: 12: classes)) tryInvokeRestart("muffleWarning")) system.time({ model <- mi$model result <- NULL tryCatch({tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) {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, nlines = 1L) model$fail <- FALSE prefix <- paste("Error in", dcall, ": ")21: model$coefficients <- result$solution LONG <- 75L model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) sm <- strsplit(conditionMessage(e), "\n")[[1L]]suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 9: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 25: type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ")12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: }tryCatchList(expr, classes, parentenv, handlers) 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))logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", }) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) "brand"), scalePar = "price", numMultiStarts = 5) if (!is.null(call)) { An irrecoverable exception occurred. R is aborting now ... if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) 15: dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75Ltry(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: 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 : "FUN(X[[i]], ...) 18: 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5)suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... An irrecoverable exception occurred. R is aborting now ... Error in names(x) <- value : 'names' attribute [3] must be the same length as the vector [0] Calls: logitr -> getMultistartSummary -> colnames<- Execution halted Flavor: r-release-macos-arm64

Version: 1.1.3
Check: re-building of vignette outputs
Result: ERROR Error(s) in re-building vignettes: --- re-building ‘basic_usage.Rmd’ using rmarkdown *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) *** caught segfault *** address 0x110, cause 'invalid permissions' 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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 ") } Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { 4: doTryCatch(return(expr), name, parentenv, handler) cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) { 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))}) 8: 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: eval(expr, envir) 27: eval(expr, envir) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 28: withVisible(eval(expr, envir)) 29: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) call <- sys.call(-4L) dcall <- deparse(call, nlines = 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 (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: 30: eval(call) 31: eval(call) 32: with_handlers({try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: 38: *** caught segfault *** address 0x110, cause 'invalid permissions' withRestartList(expr, restarts) 39: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))34: Traceback: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 36: doWithOneRestart(return(expr), restart) 2: eval_f(x0, ...) 37: 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])call_block(x) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) {47: ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) } model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) 10: TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), if (options$error && options$include) output_dir = getwd(), ...) Traceback: 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: 1: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 54: keep_message = if (is.numeric(options$message)) TRUE else options$message, mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) vweave_rmarkdown(...)12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) stop_on_error = if (is.numeric(options$error)) options$error else {55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler)13: 2: eval_f(x0, ...) 3: tryCatchList(expr, classes, parentenv, handlers) nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: 57: *** caught segfault *** *** caught segfault *** if (options$error && options$include) *** caught segfault *** tryCatchOne(expr, names, parentenv, handlers[[1L]])address 0x110, cause 'invalid permissions' 58: tryCatchList(expr, classes, parentenv, handlers)14: doTryCatch(return(expr), name, parentenv, handler)address 0x110, cause 'invalid permissions' 0L 5: address 0x110, cause 'invalid permissions' 59: tryCatch(expr, error = function(e) {tryCatch({ *** caught segfault *** else 2L call <- conditionCall(e) engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) }, output_handler = knit_handlers(options$render, options))) if (!is.null(call)) { if (!have.makefile && vignette_is_tex(output)) {address 0x110, cause 'invalid permissions' texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)tryCatchOne(expr, names, parentenv, handlers[[1L]])44: 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) { prefix <- paste("Error in", dcall, ": ")}) engine = engine)eng_r(options) LONG <- 75L 8: }system.time({}, error = function(e) { model <- mi$model OK <<- FALSE result <- NULL sm <- strsplit(conditionMessage(e), "\n")[[1L]]45: tryCatch({ w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")block_exec(params) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 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])) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", mi = mi, opts = mi$options) error = function(e) { if (!silent && isTRUE(getOption("show.error.messages"))) { file, conditionMessage(e)))}) cat(msg, file = outFile) .Internal(printDeferredWarnings()) if (progress && is.function(pb$interrupt)) } pb$interrupt() invisible(structure(msg, class = "try-error", condition = e)) }, error = function(e) { }) 15: }) if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (!is.null(result)) { }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status if (progress && is.function(pb$interrupt)) pb$interrupt() model$message <- result$message if (is_R_CMD_build() || is_R_CMD_check()) Traceback: 16: } error <<- format(e)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 1: })60: Traceback: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds")17: }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) An irrecoverable exception occurred. R is aborting now ... 1: Traceback: 9: 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) pb$interrupt() FUN(X[[i]], ...) 4: Traceback: FUN(X[[i]], ...) doTryCatch(return(expr), name, parentenv, handler)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 1: 18: lapply(seq_len(cores), inner.do) 19: 1: parallel::mclapply(miList, runModel, mc.cores = numCores) 5: 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd)12: 6: tryCatchList(expr, classes, parentenv, handlers) mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) tryCatchOne(expr, names, parentenv, handlers[[1L]]) *** caught segfault *** paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: 51: 2: 6: address 0x110, cause 'invalid permissions' eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler)eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { process_file(text, output) 5: 7: 20: tryCatchOne(expr, names, parentenv, handlers[[1L]])withCallingHandlers(expr, warning = function(w) if (inherits(w, call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 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") 5: tryCatchList(expr, classes, parentenv, handlers) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 52: tryCatch({ knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) if (is.na(w)) 7: tryCatch({ w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 6: tryCatchList(expr, classes, parentenv, handlers) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, classes)) tryInvokeRestart("muffleWarning")) mi = mi, opts = mi$options) 7: 53: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) { mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model type = "b")rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), }, error = function(e) { result <- NULL}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations tryCatch({ output_dir = getwd(), ...)}) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (w > LONG) model$status <- result$status21: model$message <- result$message }})suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) mi = mi, opts = mi$options) prefix <- paste0(prefix, "\n ")22: 8: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: }, error = function(e) { logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", }system.time({54: 9: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8: model <- mi$model58: else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")system.time({FUN(X[[i]], ...)tryCatchList(expr, classes, parentenv, handlers) result <- NULL }) "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 10: lapply(X = S, FUN = FUN, ...) Traceback: 59: 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) model <- mi$model output <- find_vignette_product(name, by = "texi2pdf", result <- NULL .Internal(seterrmessage(msg[1L])) tryCatch({ if (!silent && isTRUE(getOption("show.error.messages"))) { 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { tryCatch({ engine = engine) cat(msg, file = outFile)11: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) } .Internal(printDeferredWarnings()) }, error = function(e) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 1: } mi = mi, opts = mi$options) if (on_message$silence) {}, error = function(e) { OK <<- FALSEmi$logitFuncs$getMnlV(pars, d$X, d$scalePar) })doTryCatch(return(expr), name, parentenv, handler) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", }, error = function(e) { file, conditionMessage(e))) if (!is.null(result)) { 2: eval_f(x0, ...)}) invokeRestart("muffleMessage") model$fail <- FALSE }) } model$coefficients <- result$solution 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }, warning = function (cnd) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$message <- result$message{ model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) mi = mi, opts = mi$options)60: 9: if (getOption("warn") >= 2 || getOption("warn") < 0) { model$status <- result$status model$message <- result$message }}) 9: *** caught segfault *** }FUN(X[[i]], ...)address 0x110, cause 'invalid permissions' }) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...) return() 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds") An irrecoverable exception occurred. R is aborting now ... }10: 10: invisible(structure(msg, class = "try-error", condition = e))14: }) watcher$capture_plot_and_output()15: tryCatch(expr, error = function(e) {lapply(X = S, FUN = FUN, ...)lapply(X = S, FUN = FUN, ...)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) call <- conditionCall(e) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: if (!is.null(call)) {11: tryCatchList(expr, classes, parentenv, handlers) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) sm <- strsplit(conditionMessage(e), "\n")[[1L]]16: doTryCatch(return(expr), name, parentenv, handler) if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) 7: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") tryCatch({11: 18: 12: if (is.na(w)) tryCatchOne(expr, names, parentenv, handlers[[1L]]) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], doTryCatch(return(expr), name, parentenv, handler) } prefix <- paste("Error in", dcall, ": ") LONG <- 75L result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 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 ") 13: tryCatchList(expr, classes, parentenv, handlers)lapply(seq_len(cores), inner.do) type = "b")}, error = function(e) { if (on_warning$silence) {19: 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) invokeRestart("muffleWarning") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : "14: parallel::mclapply(miList, runModel, mc.cores = numCores) 14: }) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) 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, nlines = 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") } }}, error = function (cnd) {tryCatch(expr, error = function(e) {20: else prefix <- "Error : " watcher$capture_plot_and_output()withCallingHandlers(expr, warning = function(w) if (inherits(w, .Internal(printDeferredWarnings()) call <- conditionCall(e) 8: Traceback: cnd <- sanitize_call(cnd)system.time({ if (w > LONG) if (!is.null(call)) { 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L watcher$push(cnd) 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 : " 1: } invisible(structure(msg, class = "try-error", condition = e))}) msg <- paste0(prefix, conditionMessage(e), "\n") prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " model <- mi$model classes)) tryInvokeRestart("muffleWarning"))15: result <- NULL tryCatch({ msg <- paste0(prefix, conditionMessage(e), "\n") switch(on_error, continue = invokeRestart("eval_continue"), mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: .Internal(seterrmessage(msg[1L]))20: .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { 23: withCallingHandlers(expr, warning = function(w) if (inherits(w, stop = invokeRestart("eval_stop"), error = NULL) if (!silent && isTRUE(getOption("show.error.messages"))) {suppressMessages(suppressWarnings(parallel::mclapply(miList, cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 2: cat(msg, file = outFile)eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) })sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 16: .Internal(printDeferredWarnings())sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))18: } runModel, mc.cores = numCores))) 24: classes)) tryInvokeRestart("muffleWarning"))lapply(seq_len(cores), inner.do) 17: runMultistart(modelInputs) mi = mi, opts = mi$options) 4: }, error = function(e) {doTryCatch(return(expr), name, parentenv, handler) 21: 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", FUN(X[[i]], ...) }) "brand"), scalePar = "price", numMultiStarts = 10) if (!is.null(result)) {26: eval(expr, envir) 27: eval(expr, envir)18: 19: invisible(structure(msg, class = "try-error", condition = e)) model$fail <- FALSE 30: lapply(seq_len(cores), inner.do)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))28: parallel::mclapply(miList, runModel, mc.cores = numCores)eval(call) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))22: }) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: 20: 5: withCallingHandlers(expr, warning = function(w) if (inherits(w, FUN(X[[i]], ...) 31: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleWarning"))tryCatchOne(expr, names, parentenv, handlers[[1L]]) eval(call)23: model$coefficients <- result$solution classes)) tryInvokeRestart("muffleMessage"))withVisible(eval(expr, envir)) 29: 18: model$logLik <- as.numeric(-1 * result$objective)lapply(seq_len(cores), inner.do)withCallingHandlers(code, error = function (e) model$iterations <- result$iterations model$status <- result$status model$message <- result$message } 23: 6: suppressMessages(suppressWarnings(parallel::mclapply(miList, })rlang::entrace(e), message = function (cnd) suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 19: 21: 32: parallel::mclapply(miList, runModel, mc.cores = numCores){suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) runModel, mc.cores = numCores)))24: runMultistart(modelInputs) with_handlers({ 9: for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)tryCatchList(expr, classes, parentenv, handlers) }22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) TRUE 24: 25: runMultistart(modelInputs) watcher$capture_plot_and_output() 7: FUN(X[[i]], ...) if (on_message$capture) {logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", tryCatch({ watcher$push(cnd)25: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)20: 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, }, error = function(e) { "brand"), scalePar = "price", numMultiStarts = 10)withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)}) runModel, mc.cores = numCores)))}, handlers) 33: } 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) if (on_message$silence) { 24: runMultistart(modelInputs) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, 8: system.time({ model <- mi$model result <- NULL tryCatch({ classes)) tryInvokeRestart("muffleMessage")) invokeRestart("muffleMessage")doWithOneRestart(return(expr), restart)12: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }25: }, warning = function (cnd) tryCatchOne(expr, names, parentenv, handlers[[1L]])23: mi = mi, opts = mi$options) logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", {suppressMessages(suppressWarnings(parallel::mclapply(miList, 13: tryCatchList(expr, classes, parentenv, handlers) 26: runModel, mc.cores = numCores)))26: 14: tryCatch(expr, error = function(e) {eval(expr, envir) call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) 34: }, error = function(e) { if (getOption("warn") >= 2 || getOption("warn") < 0) { "brand"), scalePar = "price", numMultiStarts = 10)24: return() call <- sys.call(-4L) dcall <- deparse(call, nlines = 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")eval(expr, envir)27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) })withOneRestart(expr, restarts[[1L]]) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) runMultistart(modelInputs)30: 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) } if (is.na(w)) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) eval(call) 35: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 26: type = "b")withRestartList(expr, restarts[-nr]) if (w > LONG) if (!is.null(result)) {32: 27: watcher$capture_plot_and_output() eval(expr, envir) model$fail <- FALSE36: doWithOneRestart(return(expr), restart) 37: prefix <- paste0(prefix, "\n ") eval(expr, envir) model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$messagewithOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), 27: eval(expr, envir) 28: }34: withVisible(eval(expr, envir)) 31: 28: 38: stop = invokeRestart("eval_stop"), error = NULL)29: else prefix <- "Error : "withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) eval(call) msg <- paste0(prefix, conditionMessage(e), "\n") }{})withOneRestart(expr, restarts[[1L]]) watcher$capture_plot_and_output() withCallingHandlers(code, error = function (e) }) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_message$capture) {30: eval(call)rlang::entrace(e), message = function (cnd) .Internal(seterrmessage(msg[1L]))withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...)32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) if (!silent && isTRUE(getOption("show.error.messages"))) {35: watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE cat(msg, file = outFile)13: }, handlers)31: .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) }eval(call)43: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) in_input_dir(evaluate(code, envir = env, new_device = FALSE, 14: 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)18: 32: if (on_message$silence) { keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, with_handlers({tryCatch(expr, error = function(e) { watcher$push(cnd)lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) call <- conditionCall(e) }), list(rlang_trace_top_env = knit_global()))33: invokeRestart("muffleMessage") } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: }doWithOneRestart(return(expr), restart) keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() if (getOption("warn") >= 2 || getOption("warn") < 0) {doWithOneRestart(return(expr), restart) }) 22: }withCallingHandlers(expr, message = function(c) if (inherits(c, return() classes)) tryInvokeRestart("muffleMessage"))50: 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) watcher$capture_plot_and_output()34: } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) if (on_warning$capture) {xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), watcher$push(cnd) if (!is.null(call)) { error = function(e) { 49: 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) cnd <- sanitize_call(cnd)with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), } error = function(e) { } prefix <- paste("Error in", dcall, ": ") TRUEwithOneRestart(expr, restarts[[1L]]) if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) LONG <- 75L}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) 40: 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 ")rlang::entrace(e), message = function (cnd) if (progress && is.function(pb$interrupt)) pb$interrupt(){evaluate::evaluate(...) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)35: }withRestartList(expr, restarts[-nr]) 50: if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds") An irrecoverable exception occurred. R is aborting now ... 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts)}) 30: } watcher$capture_plot_and_output() if (on_warning$silence) { if (on_message$capture) {xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") } else prefix <- "Error : " eval(call)41: error = function(e) {}, warning = function (cnd) msg <- paste0(prefix, conditionMessage(e), "\n")39: .Internal(seterrmessage(msg[1L])){withRestarts(with_handlers({ invokeRestart("muffleWarning") if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 31: } keep_message = if (is.numeric(options$message)) TRUE else options$message, if (progress && is.function(pb$interrupt)) if (getOption("warn") >= 2 || getOption("warn") < 0) { pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) for (expr in tle$exprs) {eval(call) stop_on_error = if (is.numeric(options$error)) options$error else {15: paste0("\nQuitting from ", loc, if (!is.null(error)) return()}, error = function (cnd) } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() if (options$error && options$include) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: ev <- withVisible(eval(expr, envir)) paste0("\n", rule(), error, "\n", rule())) watcher$print_value(ev$value, ev$visible, envir)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 0LwithRestartList(expr, restarts[-nr])}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) }32: 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) else 2L TRUE }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, watcher$capture_plot_and_output() }with_handlers({ }, handlers)16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores)53: 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: TRUEdoWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE keep_message = if (is.numeric(options$message)) TRUE else options$message, 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) stop_on_error = if (is.numeric(options$error)) options$error else {rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), watcher$print_value(ev$value, ev$visible, envir) for (expr in tle$exprs) {}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) output_dir = getwd(), ...) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) }54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else {57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) if (options$error && options$include) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds") An irrecoverable exception occurred. R is aborting now ... 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) } 0LwithRestartList(expr, restarts) else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), if (on_warning$silence) { if (options$error && options$include) }), list(rlang_trace_top_env = knit_global())), function(loc) {45: error = function(e) { setwd(wd) invokeRestart("muffleWarning") 0Lblock_exec(params) else 2L }, output_handler = knit_handlers(options$render, options)) write_utf8(res, output %n% stdout()) 42: 46: paste0("\nQuitting from ", loc, if (!is.null(error)) in_dir(input_dir(), expr) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)49: } call_block(x)}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)51: 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), if (progress && is.function(pb$interrupt)) error = function(e) { pb$interrupt()}) if (is_R_CMD_build() || is_R_CMD_check()) process_file(text, output) if (progress && is.function(pb$interrupt)) 47: 30: pb$interrupt()eval(call) if (is_R_CMD_build() || is_R_CMD_check()) 46: error <<- format(e) error <<- format(e)52: }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() process_group(group) if (is_R_CMD_build() || is_R_CMD_check()) call_block(x)31: eval(call) knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) }), list(rlang_trace_top_env = knit_global())), function(loc) { error <<- format(e) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) 32: }), list(rlang_trace_top_env = knit_global())), function(loc) {47: 57: with_handlers({tryCatchOne(expr, names, parentenv, handlers[[1L]])process_group(group) setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule())) for (expr in tle$exprs) { paste0("\n", rule(), error, "\n", rule())) ev <- withVisible(eval(expr, envir))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: 48: watcher$capture_plot_and_output()}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)48: process_file(text, output)withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 58: tryCatchList(expr, classes, parentenv, handlers) 59: watcher$print_value(ev$value, ev$visible, envir) error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) } tryCatch({ 51: 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)52: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), engine$weave(file, quiet = quiet, encoding = enc) error = function(e) { 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) if (progress && is.function(pb$interrupt)) TRUE }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", process_file(text, output) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) error <<- format(e)53: 53: TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds")}, handlers)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) output_dir = getwd(), ...) An irrecoverable exception occurred. R is aborting now ... 53: 54: 33: 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) doWithOneRestart(return(expr), restart)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)vweave_rmarkdown(...) })56: 34: 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc)withOneRestart(expr, restarts[[1L]])doTryCatch(return(expr), name, parentenv, handler) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 56: doTryCatch(return(expr), name, parentenv, handler)55: engine$weave(file, quiet = quiet, encoding = enc)35: error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt()withRestartList(expr, restarts[-nr]) if (is_R_CMD_build() || is_R_CMD_check()) 36: 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: doWithOneRestart(return(expr), restart)56: error <<- format(e)doTryCatch(return(expr), name, parentenv, handler) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: 57: tryCatch({tryCatchOne(expr, names, parentenv, handlers[[1L]]) }), list(rlang_trace_top_env = knit_global())) 58: engine$weave(file, quiet = quiet, encoding = enc)tryCatchList(expr, classes, parentenv, handlers) setwd(startdir) withRestartList(expr, restarts)57: output <- find_vignette_product(name, by = "weave", engine = engine)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 39: 59: 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) withRestarts(with_handlers({tryCatch({ pb$interrupt() for (expr in tle$exprs) { if (!have.makefile && vignette_is_tex(output)) { ev <- withVisible(eval(expr, envir))58: tryCatchList(expr, classes, parentenv, handlers) watcher$capture_plot_and_output() if (is_R_CMD_build() || is_R_CMD_check()) texi2pdf(file = output, clean = FALSE, quiet = quiet)59: engine$weave(file, quiet = quiet, encoding = enc) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)tryCatch({ 40: evaluate::evaluate(...) 41: error <<- format(e)evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, setwd(startdir) output <- find_vignette_product(name, by = "texi2pdf", engine$weave(file, quiet = quiet, encoding = enc) keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) engine = engine) }), list(rlang_trace_top_env = knit_global())), function(loc) { } output <- find_vignette_product(name, by = "weave", engine = engine) setwd(wd) setwd(startdir) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "weave", engine = engine)43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L if (!have.makefile && vignette_is_tex(output)) {}, error = function(e) { write_utf8(res, output %n% stdout()) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) paste0("\nQuitting from ", loc, if (!is.null(error)) OK <<- FALSE } texi2pdf(file = output, clean = FALSE, quiet = quiet) }, output_handler = knit_handlers(options$render, options))) 44: }, error = function(e) { output <- find_vignette_product(name, by = "texi2pdf", engine = engine) paste0("\n", rule(), error, "\n", rule()))eng_r(options) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", OK <<- FALSE}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) file, conditionMessage(e)))}) 60: } message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", }, error = function(e) {45: 51: block_exec(params)process_file(text, output)tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)46: file, conditionMessage(e))) OK <<- FALSEcall_block(x) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 53: })rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds")47: process_group(group) output_dir = getwd(), ...) file, conditionMessage(e))) 60: An irrecoverable exception occurred. R is aborting now ... })tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 60: 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) 54: pb$interrupt()tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds")vweave_rmarkdown(...) if (is_R_CMD_build() || is_R_CMD_check()) TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds") error <<- format(e) An irrecoverable exception occurred. R is aborting now ... }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) error = function(e) { if (progress && is.function(pb$interrupt)) 59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc)An irrecoverable exception occurred. R is aborting now ... pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds") An irrecoverable exception occurred. R is aborting now ... output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a536aa881.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from basic_usage.Rmd:82-91 [unnamed-chunk-7] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `names(x) <- value`: ! 'names' attribute [3] must be the same length as the vector [0] --- Backtrace: ▆ 1. └─logitr::logitr(...) 2. └─logitr:::getMultistartSummary(allModels) 3. └─base::`colnames<-`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'basic_usage.Rmd' failed with diagnostics: 'names' attribute [3] must be the same length as the vector [0] --- failed re-building ‘basic_usage.Rmd’ --- re-building ‘benchmark.Rmd’ using rmarkdown --- finished re-building ‘benchmark.Rmd’ --- re-building ‘convergence.Rmd’ using rmarkdown --- finished re-building ‘convergence.Rmd’ --- re-building ‘data_formatting.Rmd’ using rmarkdown --- finished re-building ‘data_formatting.Rmd’ --- re-building ‘interactions.Rmd’ using rmarkdown --- finished re-building ‘interactions.Rmd’ --- re-building ‘mnl_models.Rmd’ using rmarkdown *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** *** caught segfault *** address 0x110, cause 'invalid permissions' address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]tryCatchList(expr, classes, parentenv, handlers) 7: 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) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { 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()) } model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 9: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) FUN(X[[i]], ...)16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) Traceback: 1: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 2: 2: eval_f(x0, ...) 3: 3: 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 10: 2: eval_f(x0, ...)nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: lapply(X = S, FUN = FUN, ...) 3: eval(expr, envir) mi = mi, opts = mi$options) 4: 28: eval_f(x0, ...)doTryCatch(return(expr), name, parentenv, handler) mi = mi, opts = mi$options) withVisible(eval(expr, envir)) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: 29: 11: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, watcher$push(cnd)doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) mi = mi, opts = mi$options) }nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatchList(expr, classes, parentenv, handlers) if (on_message$silence) { invokeRestart("muffleMessage") } mi = mi, opts = mi$options)13: 4: tryCatchList(expr, classes, parentenv, handlers) 14: doTryCatch(return(expr), name, parentenv, handler) 5: 7: tryCatch(expr, error = function(e) { tryCatch({ 4: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: 4: call <- conditionCall(e)}, warning = function (cnd) tryCatchList(expr, classes, parentenv, handlers)doTryCatch(return(expr), name, parentenv, handler) if (!is.null(call)) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, doTryCatch(return(expr), name, parentenv, handler) 7: { 5: if (getOption("warn") >= 2 || getOption("warn") < 0) { 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) return() mi = mi, opts = mi$options) if (identical(call[[1L]], quote(doTryCatch))) 6: }, error = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchList(expr, classes, parentenv, handlers) }) 6: } 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { })tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) tryCatch({ watcher$capture_plot_and_output()}, error = function(e) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, call <- sys.call(-4L) mi = mi, opts = mi$options)}, error = function(e) {}) if (on_warning$capture) {12: 7: tryCatchOne(expr, names, parentenv, handlers[[1L]]) cnd <- sanitize_call(cnd)}) watcher$push(cnd)tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) dcall <- deparse(call, nlines = 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) model$iterations <- result$iterations if (on_warning$silence) { 8: model$status <- result$status13: model$message <- result$message prefix <- paste0(prefix, "\n ")tryCatchList(expr, classes, parentenv, handlers) 14: } }tryCatch(expr, error = function(e) {system.time({ model <- mi$model result <- NULL call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 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 : "}) 8: system.time({ model <- mi$model result <- NULL else prefix <- "Error : " tryCatch({ tryCatch({ 9: invokeRestart("muffleWarning") result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE }FUN(X[[i]], ...) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, msg <- paste0(prefix, conditionMessage(e), "\n")10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: model$coefficients <- result$solutiontryCatchOne(expr, names, parentenv, handlers[[1L]]) mi = mi, opts = mi$options) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) {}, error = function (cnd) }, error = function(e) { model$logLik <- as.numeric(-1 * result$objective){ }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$iterations <- result$iterations watcher$capture_plot_and_output() msg <- paste0(prefix, conditionMessage(e), "\n") model$logLik <- as.numeric(-1 * result$objective) cnd <- sanitize_call(cnd) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) watcher$push(cnd) .Internal(printDeferredWarnings()) switch(on_error, continue = invokeRestart("eval_continue"), model$iterations <- result$iterations model$status <- result$status cat(msg, file = outFile) stop = invokeRestart("eval_stop"), error = NULL)13: .Internal(printDeferredWarnings()) model$status <- result$status})tryCatchList(expr, classes, parentenv, handlers) } model$message <- result$message 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) } model$message <- result$message30: } invisible(structure(msg, class = "try-error", condition = e)) invisible(structure(msg, class = "try-error", condition = e))}) } if (!is.null(call)) {})})eval(call) }) 15: *** caught segfault *** address 0x110, cause 'invalid permissions' 9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) *** caught segfault *** 31: eval(call) 32: FUN(X[[i]], ...)16: 9: address 0x110, cause 'invalid permissions' FUN(X[[i]], ...)with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) if (identical(call[[1L]], quote(doTryCatch))) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) } 17: TRUE}, handlers) *** caught segfault *** call <- sys.call(-4L) 10: 10: address 0x110, cause 'invalid permissions' lapply(X = S, FUN = FUN, ...) 11: dcall <- deparse(call, nlines = 1L)33: doTryCatch(return(expr), name, parentenv, handler)lapply(X = S, FUN = FUN, ...)doWithOneRestart(return(expr), restart)15: 12: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)11: prefix <- paste("Error in", dcall, ": ") doTryCatch(return(expr), name, parentenv, handler) 16: LONG <- 75LFUN(X[[i]], ...) 18: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))34: lapply(seq_len(cores), inner.do) sm <- strsplit(conditionMessage(e), "\n")[[1L]]withOneRestart(expr, restarts[[1L]]) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 17: if (is.na(w)) FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 23: 12: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 35: type = "b") withRestartList(expr, restarts[-nr])tryCatchOne(expr, names, parentenv, handlers[[1L]]) suppressMessages(suppressWarnings(parallel::mclapply(miList, 20: 13: 36: tryCatchList(expr, classes, parentenv, handlers) runModel, mc.cores = numCores)))13: doWithOneRestart(return(expr), restart)withCallingHandlers(expr, warning = function(w) if (inherits(w, tryCatchList(expr, classes, parentenv, handlers) classes)) tryInvokeRestart("muffleWarning")) 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"))) {14: cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 14: tryCatch(expr, error = function(e) {15: 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) call <- conditionCall(e)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) if (!is.null(call)) {27: eval(expr, envir) Traceback: *** caught segfault *** address 0x110, cause 'invalid permissions' tryCatch(expr, error = function(e) {28: 21: Traceback: withVisible(eval(expr, envir)) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) 1: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) prefix <- paste("Error in", dcall, ": ") 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)38: Traceback: withRestartList(expr, restarts) 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))}) 1: 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } Traceback: TRUE 2: 22: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: withCallingHandlers(expr, message = function(c) if (inherits(c, eval_f(x0, ...)runMultistart(modelInputs)}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) classes)) tryInvokeRestart("muffleMessage"))29: 2: 6: 1: call <- conditionCall(e)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 3: withCallingHandlers(code, error = function (e) tryCatchList(expr, classes, parentenv, handlers) if (!is.null(call)) {eval_f(x0, ...)16: rlang::entrace(e), message = function (cnd) 6: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 25: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)){ if (identical(call[[1L]], quote(doTryCatch))) tryCatchList(expr, classes, parentenv, handlers) mi = mi, opts = mi$options) watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) 4: call <- sys.call(-4L)logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 40: doTryCatch(return(expr), name, parentenv, handler) dcall <- deparse(call, nlines = 1L) 7: 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 ") } 5: "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) }tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 23: 17: evaluate::evaluate(...) 7: 3: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) { else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))tryCatchOne(expr, names, parentenv, handlers[[1L]]) suppressMessages(suppressWarnings(parallel::mclapply(miList, mi = mi, opts = mi$options)nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, FUN(X[[i]], ...) 6: tryCatchList(expr, classes, parentenv, handlers)}) runModel, mc.cores = numCores))) if (!silent && isTRUE(getOption("show.error.messages"))) { mi = mi, opts = mi$options) if (on_message$silence) {41: 7: invokeRestart("muffleMessage") }}, warning = function (cnd) { 26: 8: if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) {eval(expr, envir) 4: cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: watcher$capture_plot_and_output() }, error = function(e) {tryCatch({18: cnd <- sanitize_call(cnd)evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})}) watcher$push(cnd) 27: keep_message = if (is.numeric(options$message)) TRUE else options$message, switch(on_error, continue = invokeRestart("eval_continue"), 8: system.time({ model <- mi$model result <- NULL tryCatch({eval(expr, envir) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, mi = mi, opts = mi$options)24: doTryCatch(return(expr), name, parentenv, handler)runMultistart(modelInputs)lapply(seq_len(cores), inner.do) stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) }, error = function(e) { system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))28: }) 19: 8: system.time({ model <- mi$model result <- NULL stop_on_error = if (is.numeric(options$error)) options$error else { withVisible(eval(expr, envir))31: 25: eval(call) 32: with_handlers({ for (expr in tle$exprs) {parallel::mclapply(miList, runModel, mc.cores = numCores) if (options$error && options$include) model$coefficients <- result$solution if (!is.null(result)) { tryCatch({logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 29: 5: 0L model$fail <- FALSE ev <- withVisible(eval(expr, envir)) model$logLik <- as.numeric(-1 * result$objective)tryCatchOne(expr, names, parentenv, handlers[[1L]]) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, withCallingHandlers(code, error = function (e) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() else 2L model$iterations <- result$iterationsrlang::entrace(e), message = function (cnd) "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: model$coefficients <- result$solution watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 31: model$status <- result$statuseval(call) 32: }, output_handler = knit_handlers(options$render, options))) 6: tryCatchList(expr, classes, parentenv, handlers)withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: model$logLik <- as.numeric(-1 * result$objective)37: mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) {withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) model$message <- result$message 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: 7: 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2Llogitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", model$iterations <- result$iterations26: doTryCatch(return(expr), name, parentenv, handler) }, output_handler = knit_handlers(options$render, options)) "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) model$status <- result$statuseval(expr, envir) model$fail <- FALSE 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterationstryCatch({ with_handlers({12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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 ") } model$status <- result$status for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) return() model$message <- result$message else prefix <- "Error : "36: model$message <- result$message result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }}) 9: FUN(X[[i]], ...) 10: { }}) 26: eval(expr, envir) 27: } watcher$capture_plot_and_output() watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) {44: lapply(X = S, FUN = FUN, ...) mi = mi, opts = mi$options) invokeRestart("muffleWarning") 9: eng_r(options) 45: if (on_message$capture) {block_exec(params) 46: call_block(x) 47: process_group(group) }, error = function(e) {eval(expr, envir) msg <- paste0(prefix, conditionMessage(e), "\n")FUN(X[[i]], ...) .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))48: 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler)11: doWithOneRestart(return(expr), restart) })28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) 42: { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd)withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), in_dir(input_dir(), expr) } watcher$push(cnd)}) } if (on_message$silence) { invokeRestart("muffleMessage") }37: 12: doTryCatch(return(expr), name, parentenv, handler) watcher$push(cnd) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 1L) tryCatchOne(expr, names, parentenv, handlers[[1L]])}, warning = function (cnd) } prefix <- paste("Error in", dcall, ": ") 43: {}, error = function (cnd) error = function(e) {{ watcher$capture_plot_and_output()15: if (on_warning$silence) { 8: in_input_dir(evaluate(code, envir = env, new_device = FALSE, if (progress && is.function(pb$interrupt)) LONG <- 75L if (getOption("warn") >= 2 || getOption("warn") < 0) { invokeRestart("muffleWarning")system.time({ cnd <- sanitize_call(cnd) pb$interrupt()try(lapply(X = S, FUN = FUN, ...), silent = TRUE) return()withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) model <- mi$model watcher$push(cnd) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, } 13: sm <- strsplit(conditionMessage(e), "\n")[[1L]]tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { result <- NULL } if (is_R_CMD_build() || is_R_CMD_check()) 38: switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL) tryCatch({}) keep_message = if (is.numeric(options$message)) TRUE else options$message, withRestartList(expr, restarts) watcher$capture_plot_and_output() 39: withRestarts(with_handlers({ for (expr in tle$exprs) {}, error = function (cnd) error <<- format(e) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, call <- conditionCall(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") mi = mi, opts = mi$options) ev <- withVisible(eval(expr, envir))16: error = function(e) { if (!is.null(call)) { if (on_warning$capture) {30: stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), if (is.na(w)) if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) if (identical(call[[1L]], quote(doTryCatch))) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " cnd <- sanitize_call(cnd)eval(call) }, error = function(e) {{ msg <- paste0(prefix, conditionMessage(e), "\n") watcher$push(cnd) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e)) error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) watcher$capture_plot_and_output() call <- sys.call(-4L) dcall <- deparse(call, nlines = 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 (progress && is.function(pb$interrupt)) 40: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))51: if (is.na(w)) pb$interrupt() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) model$iterations <- result$iterations model$status <- result$statusevaluate::evaluate(...)process_file(text, output) if (is_R_CMD_build() || is_R_CMD_check()) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], }) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) watcher$capture_plot_and_output() type = "b") model$message <- result$message }}) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: error <<- format(e) } 41: cnd <- sanitize_call(cnd) 9: if (w > LONG) 53: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 15: watcher$push(cnd)42: if (on_warning$silence) {rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), FUN(X[[i]], ...) }), list(rlang_trace_top_env = knit_global())) prefix <- paste0(prefix, "\n ") switch(on_error, continue = invokeRestart("eval_continue"), keep_message = if (is.numeric(options$message)) TRUE else options$message, try(lapply(X = S, FUN = FUN, ...), silent = TRUE)in_dir(input_dir(), expr)withCallingHandlers(expr, message = function(c) if (inherits(c, output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) } stop_on_error = if (is.numeric(options$error)) options$error else { stop = invokeRestart("eval_stop"), error = NULL) 50: else prefix <- "Error : " if (options$error && options$include) })16: classes)) tryInvokeRestart("muffleMessage")) msg <- paste0(prefix, conditionMessage(e), "\n")10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart)57: invokeRestart("muffleWarning") .Internal(seterrmessage(msg[1L]))xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 43: 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) if (!silent && isTRUE(getOption("show.error.messages"))) { }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))in_input_dir(evaluate(code, envir = env, new_device = FALSE, 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, lapply(seq_len(cores), inner.do)tryCatchOne(expr, names, parentenv, handlers[[1L]]) cat(msg, file = outFile) }, error = function (cnd) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) .Internal(printDeferredWarnings())23: { 19: 58: error = function(e) { keep_message = if (is.numeric(options$message)) TRUE else options$message, watcher$capture_plot_and_output()19: parallel::mclapply(miList, runModel, mc.cores = numCores)tryCatchList(expr, classes, parentenv, handlers) if (progress && is.function(pb$interrupt)) stop_on_error = if (is.numeric(options$error)) options$error else { cnd <- sanitize_call(cnd) } pb$interrupt() if (options$error && options$include) suppressMessages(suppressWarnings(parallel::mclapply(miList, watcher$push(cnd)39: invisible(structure(msg, class = "try-error", condition = e)) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: keep_message = if (is.numeric(options$message)) TRUE else options$message, 0LwithRestarts(with_handlers({ runModel, mc.cores = numCores)))}) parallel::mclapply(miList, runModel, mc.cores = numCores) stop_on_error = if (is.numeric(options$error)) options$error else { else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 15: for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L if (is_R_CMD_build() || is_R_CMD_check()) if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))block_exec(params) 46: call_block(x) 47: process_group(group) error <<- format(e) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 24: 22: 59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)20: }), list(rlang_trace_top_env = knit_global())), function(loc) {48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) if (progress && is.function(pb$interrupt)) try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) withCallingHandlers(expr, warning = function(w) if (inherits(w, setwd(wd) }, output_handler = knit_handlers(options$render, options))) 44: keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { classes)) tryInvokeRestart("muffleWarning"))runMultistart(modelInputs) write_utf8(res, output %n% stdout())eng_r(options) watcher$capture_plot_and_output() if (options$error && options$include) 45: block_exec(params) 46: call_block(x)withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: pb$interrupt() 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: 17: FUN(X[[i]], ...) if (is_R_CMD_build() || is_R_CMD_check()) 25: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { output <- find_vignette_product(name, by = "texi2pdf", paste0("\nQuitting from ", loc, if (!is.null(error)) eval(expr, envir) logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 21: 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) engine = engine) }}, error = function(e) { watcher$print_value(ev$value, ev$visible, envir)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) error <<- format(e) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: }18: "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)27: doTryCatch(return(expr), name, parentenv, handler) OK <<- FALSE paste0("\n", rule(), error, "\n", rule()))lapply(seq_len(cores), inner.do) }) TRUE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage")57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE26: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)49: eval(expr, envir)51: process_file(text, output) 52: 19: message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)}) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", parallel::mclapply(miList, runModel, mc.cores = numCores) }27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) {22: file, conditionMessage(e))) TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds")with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), }, warning = function (cnd) 53: 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds") An irrecoverable exception occurred. R is aborting now ... rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: watcher$capture_plot_and_output()withCallingHandlers(expr, message = function(c) if (inherits(c, }) 60: 40: error = function(e) {vweave_rmarkdown(...) if (on_message$capture) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))54: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds") An irrecoverable exception occurred. R is aborting now ... watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output()evaluate::evaluate(...) vweave_rmarkdown(...) classes)) tryInvokeRestart("muffleMessage")) if (on_warning$capture) { {55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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", cnd <- sanitize_call(cnd)23: An irrecoverable exception occurred. R is aborting now ... engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 22: 55: watcher$push(cnd)26: eval(expr, envir) 27: engine$weave(file, quiet = quiet, encoding = enc)}) eval(expr, envir) } if (on_warning$silence) { if (getOption("warn") >= 2 || getOption("warn") < 0) { 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds")tryCatchList(expr, classes, parentenv, handlers)withCallingHandlers(expr, message = function(c) if (inherits(c, return() 59: tryCatch({41: } watcher$capture_plot_and_output()evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) invokeRestart("muffleWarning") 28: An irrecoverable exception occurred. R is aborting now ... withVisible(eval(expr, envir)) if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: 42: engine$weave(file, quiet = quiet, encoding = enc)doWithOneRestart(return(expr), restart) }}, error = function (cnd) 29: 34: { 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) }withOneRestart(expr, restarts[[1L]]) 35: }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e))) classes)) tryInvokeRestart("muffleMessage"))in_dir(input_dir(), expr) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { watcher$capture_plot_and_output() 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2LwithCallingHandlers(code, error = function (e) withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) }, output_handler = knit_handlers(options$render, options))) if (getOption("warn") >= 2 || getOption("warn") < 0) { cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) doWithOneRestart(return(expr), restart)}) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 51: return() pb$interrupt() } watcher$capture_plot_and_output() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: process_file(text, output)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds") An irrecoverable exception occurred. R is aborting now ... rlang::entrace(e), message = function (cnd) 34: withOneRestart(expr, restarts[[1L]]) if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir){41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) } switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds") An irrecoverable exception occurred. R is aborting now ... TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: 37: 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ watcher$capture_plot_and_output()tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) watcher$print_value(ev$value, ev$visible, envir) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds") An irrecoverable exception occurred. R is aborting now ... 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) block_exec(params) 46: call_block(x) 47: for (expr in tle$exprs) {process_group(group) 58: tryCatchList(expr, classes, parentenv, handlers) 59: ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)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) }}, error = function(e) { pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", }), list(rlang_trace_top_env = knit_global())) file, conditionMessage(e))) }) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds")50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() stop_on_error = if (is.numeric(options$error)) options$error else {An irrecoverable exception occurred. R is aborting now ... if (options$error && options$include) if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds") An irrecoverable exception occurred. R is aborting now ... if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a541a468ed.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from mnl_models.Rmd:85-98 [unnamed-chunk-9] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `names(x) <- value`: ! 'names' attribute [3] must be the same length as the vector [0] --- Backtrace: ▆ 1. └─logitr::logitr(...) 2. └─logitr:::getMultistartSummary(allModels) 3. └─base::`colnames<-`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'mnl_models.Rmd' failed with diagnostics: 'names' attribute [3] must be the same length as the vector [0] --- failed re-building ‘mnl_models.Rmd’ --- re-building ‘mnl_models_weighted.Rmd’ using rmarkdown *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) *** caught segfault *** address 0x110, cause 'invalid permissions' 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) *** caught segfault *** address 0x110, cause 'invalid permissions' 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$messagermarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...)55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers)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, nlines = 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)) 59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) 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) if (!have.makefile && vignette_is_tex(output)) { Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: texi2pdf(file = output, clean = FALSE, quiet = quiet)eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: .Internal(printDeferredWarnings()) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 17: FUN(X[[i]], ...) file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") An irrecoverable exception occurred. R is aborting now ... 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatchList(expr, classes, parentenv, handlers) 7: 24: runMultistart(modelInputs) 25: mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {logitr(data = cars_us, outcome = "choice", obsID = "obsnum", *** caught segfault *** tryCatch({}) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", 8: address 0x110, cause 'invalid permissions' model <- mi$modelsystem.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]){ if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output(){ watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") } watcher$push(cnd)}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() }13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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") watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } 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 : " } if (on_warning$silence) { if (on_warning$silence) { invokeRestart("muffleWarning") 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) } TRUE22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: }, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) }) 30: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...)38: withRestartList(expr, restarts) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 39: withRestarts(with_handlers({ for (expr in tle$exprs) { mi = mi, opts = mi$options)suppressMessages(suppressWarnings(parallel::mclapply(miList, ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()eval(call) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: runModel, mc.cores = numCores))) 24: runMultistart(modelInputs)31: eval(call) 32: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, 25: with_handlers({ for (expr in tle$exprs) { 4: doTryCatch(return(expr), name, parentenv, handler)logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), stop_on_error = if (is.numeric(options$error)) options$error else { 5: scalePar = "price", robust = TRUE, numMultiStarts = 10)tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (options$error && options$include) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() 0L watcher$print_value(ev$value, ev$visible, envir) 6: tryCatchList(expr, classes, parentenv, handlers) else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) } 0L 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 26: TRUE}, handlers) mi = mi, opts = mi$options)}, error = function(e) {}) 33: doWithOneRestart(return(expr), restart) else 2L }, output_handler = knit_handlers(options$render, options))) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective)34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) model$iterations <- result$iterations44: eng_r(options) 45: block_exec(params) model$status <- result$statuseval(expr, envir) 27: eval(expr, envir) model$message <- result$message }46: call_block(x) 47: process_group(group) }) *** caught segfault *** address 0x110, cause 'invalid permissions' 28: withVisible(eval(expr, envir)) 29: 48: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd)withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), }36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { *** caught segfault *** 9: address 0x110, cause 'invalid permissions' ev <- withVisible(eval(expr, envir)) error = function(e) { watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (progress && is.function(pb$interrupt)) 40: evaluate::evaluate(...) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) FUN(X[[i]], ...) error <<- format(e)41: }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0L13: tryCatchList(expr, classes, parentenv, handlers) else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") if (progress && is.function(pb$interrupt)) pb$interrupt() }43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, }, error = function (cnd) 14: keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, { keep_message = if (is.numeric(options$message)) TRUE else options$message, watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 30: eval(call) 31: error = function(e) {eval(call) if (identical(call[[1L]], quote(doTryCatch))) if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd)32: call <- sys.call(-4L)with_handlers({ dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")44: for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() LONG <- 75L watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) doWithOneRestart(return(expr), restart) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") 34: withOneRestart(expr, restarts[[1L]]) eng_r(options) 45: if (w > LONG) block_exec(params)35: write_utf8(res, output %n% stdout()) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: withRestartList(expr, restarts[-nr]) prefix <- paste0(prefix, "\n ") 46: Traceback: }process_file(text, output) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: else prefix <- "Error : " doTryCatch(return(expr), name, parentenv, handler)36: 3: msg <- paste0(prefix, conditionMessage(e), "\n")call_block(x) 5: 52: .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) {doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)tryCatchOne(expr, names, parentenv, handlers[[1L]])39: withRestarts(with_handlers({ 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: tryCatch({ for (expr in tle$exprs) { 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)system.time({ engine$weave(file, quiet = quiet, encoding = enc) model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") An irrecoverable exception occurred. R is aborting now ... 47: process_group(group) cat(msg, file = outFile)40: }) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) .Internal(printDeferredWarnings())evaluate::evaluate(...) if (!is.null(result)) {nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) model$fail <- FALSE model$coefficients <- result$solution pb$interrupt()41: model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations if (is_R_CMD_build() || is_R_CMD_check()) }evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, error <<- format(e) model$status <- result$status model$message <- result$message invisible(structure(msg, class = "try-error", condition = e)) }) }}) 9: FUN(X[[i]], ...) keep_message = if (is.numeric(options$message)) TRUE else options$message, 4: 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) doTryCatch(return(expr), name, parentenv, handler) }) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 10: 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: lapply(X = S, FUN = FUN, ...) stop_on_error = if (is.numeric(options$error)) options$error else {15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (options$error && options$include) 11: tryCatchList(expr, classes, parentenv, handlers) 0L else 2L 7: }, output_handler = knit_handlers(options$render, options)))tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 16: doTryCatch(return(expr), name, parentenv, handler) 44: eng_r(options) mi = mi, opts = mi$options)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }, error = function(e) { })17: 45: block_exec(params) 46: call_block(x) 47: FUN(X[[i]], ...) process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 18: error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global()))12: 50: 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: lapply(seq_len(cores), inner.do) error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (progress && is.function(pb$interrupt)) tryCatchList(expr, classes, parentenv, handlers) if (is_R_CMD_build() || is_R_CMD_check()) 8: error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) {system.time({ model <- mi$model result <- NULL setwd(wd) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 19: mi = mi, opts = mi$options) 14: tryCatch(expr, error = function(e) {parallel::mclapply(miList, runModel, mc.cores = numCores) pb$interrupt() write_utf8(res, output %n% stdout()) call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)20: if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)withCallingHandlers(expr, warning = function(w) if (inherits(w, dcall <- deparse(call, nlines = 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)) paste0("\nQuitting from ", loc, if (!is.null(error)) classes)) tryInvokeRestart("muffleWarning")) }, error = function(e) { }) if (!is.null(result)) { }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: model$fail <- FALSE w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], vweave_rmarkdown(...) model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }21: type = "b") if (w > LONG) suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, paste0("\n", rule(), error, "\n", rule()))55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) prefix <- paste0(prefix, "\n ") classes)) tryInvokeRestart("muffleMessage")) }}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: tryCatch({23: }) suppressMessages(suppressWarnings(parallel::mclapply(miList, if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) engine$weave(file, quiet = quiet, encoding = enc) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: setwd(startdir) 51: process_file(text, output) output <- find_vignette_product(name, by = "weave", engine = engine) } runModel, mc.cores = numCores))) invisible(structure(msg, class = "try-error", condition = e))52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: }) 15: 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])try(lapply(X = S, FUN = FUN, ...), silent = TRUE)runMultistart(modelInputs) if (!have.makefile && vignette_is_tex(output)) { doTryCatch(return(expr), name, parentenv, handler)25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", 57: texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") An irrecoverable exception occurred. R is aborting now ... 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]tryCatchOne(expr, names, parentenv, handlers[[1L]]) "bev150", "american", "japanese", "chinese", "skorean", w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir)58: 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) tryCatchList(expr, classes, parentenv, handlers) if (is.na(w)) 18: lapply(seq_len(cores), inner.do) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd)59: if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) }tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) if (on_message$silence) { 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", invokeRestart("muffleMessage") file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") if (!silent && isTRUE(getOption("show.error.messages"))) { An irrecoverable exception occurred. R is aborting now ... cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output()eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) watcher$capture_plot_and_output(){ watcher$print_value(ev$value, ev$visible, envir) } if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } TRUE watcher$capture_plot_and_output()18: lapply(seq_len(cores), inner.do) if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call)19: }, handlers) parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))33: 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]])31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))35: 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning")withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } watcher$print_value(ev$value, ev$visible, envir) }}, error = function (cnd) TRUE{ }}, handlers) 33: doWithOneRestart(return(expr), restart) 34: TRUEwithOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) watcher$capture_plot_and_output()36: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: doWithOneRestart(return(expr), restart)with_handlers({ 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: process_group(group) 48: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), else 2L33: }, output_handler = knit_handlers(options$render, options))doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 36: doWithOneRestart(return(expr), restart) 42: in_dir(input_dir(), expr) 37: error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global()))withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 50: 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, 39: keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, withRestarts(with_handlers({xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), for (expr in tle$exprs) { keep_message = if (is.numeric(options$message)) TRUE else options$message, error = function(e) { stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) ev <- withVisible(eval(expr, envir)) 0L paste0("\nQuitting from ", loc, if (!is.null(error)) watcher$capture_plot_and_output() else 2L paste0("\n", rule(), error, "\n", rule())) }, output_handler = knit_handlers(options$render, options)))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 44: eng_r(options)52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e))) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, 45: }) block_exec(params) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") An irrecoverable exception occurred. R is aborting now ... 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) stop_on_error = if (is.numeric(options$error)) options$error else { pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 45: block_exec(params) 46: call_block(x) 47: 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]])process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { 58: tryCatchList(expr, classes, parentenv, handlers) 59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) if (progress && is.function(pb$interrupt)) pb$interrupt() 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") An irrecoverable exception occurred. R is aborting now ... if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a52de0ad49.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from mnl_models_weighted.Rmd:64-80 [unnamed-chunk-3] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `names(x) <- value`: ! 'names' attribute [3] must be the same length as the vector [0] --- Backtrace: ▆ 1. └─logitr::logitr(...) 2. └─logitr:::getMultistartSummary(allModels) 3. └─base::`colnames<-`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'mnl_models_weighted.Rmd' failed with diagnostics: 'names' attribute [3] must be the same length as the vector [0] --- failed re-building ‘mnl_models_weighted.Rmd’ --- re-building ‘mxl_models.Rmd’ using rmarkdown --- finished re-building ‘mxl_models.Rmd’ --- re-building ‘predict.Rmd’ using rmarkdown *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 17: 18: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) *** caught segfault *** address 0x110, cause 'invalid permissions' { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: 35: withRestartList(expr, restarts[-nr]) with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE36: doWithOneRestart(return(expr), restart) 37: }, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 38: withRestartList(expr, restarts) 39: 40: evaluate::evaluate(...) 41: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global()))with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule())) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout())}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 51: process_file(text, output) tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) eval_f(x0, ...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L 8: system.time({ model <- mi$model }, output_handler = knit_handlers(options$render, options))) 44: result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) {eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message } pb$interrupt()}) 9: FUN(X[[i]], ...) if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 1L) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 53: 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...)22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 55: engine$weave(file, quiet = quiet, encoding = enc) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) {56: doTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", }, handlers) 33: doWithOneRestart(return(expr), restart) TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) *** caught segfault *** address 0x110, cause 'invalid permissions' }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: 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, nlines = 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))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 31: eval(call) 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 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) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/Rtmpjxe7JC/filef4a540d925e2.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from predict.Rmd:91-109 [unnamed-chunk-5] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `names(x) <- value`: ! 'names' attribute [3] must be the same length as the vector [0] --- Backtrace: ▆ 1. └─logitr::logitr(...) 2. └─logitr:::getMultistartSummary(allModels) 3. └─base::`colnames<-`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'predict.Rmd' failed with diagnostics: 'names' attribute [3] must be the same length as the vector [0] --- failed re-building ‘predict.Rmd’ --- re-building ‘summarizing_results.Rmd’ using rmarkdown --- finished re-building ‘summarizing_results.Rmd’ --- re-building ‘utility_models.Rmd’ using rmarkdown --- finished re-building ‘utility_models.Rmd’ SUMMARY: processing the following files failed: ‘basic_usage.Rmd’ ‘mnl_models.Rmd’ ‘mnl_models_weighted.Rmd’ ‘predict.Rmd’ Error: Vignette re-building failed. Execution halted Flavor: r-release-macos-arm64