CRAN Package Check Results for Package logitr

Last updated on 2026-06-12 02:51:02 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.3 4.66 152.08 156.74 OK
r-devel-linux-x86_64-debian-gcc 1.1.3 3.77 114.87 118.64 OK
r-devel-linux-x86_64-fedora-clang 1.1.3 9.00 243.96 252.96 OK
r-devel-linux-x86_64-fedora-gcc 1.1.3 10.00 278.15 288.15 OK
r-devel-windows-x86_64 1.1.3 8.00 217.00 225.00 OK
r-patched-linux-x86_64 1.1.3 5.49 145.06 150.55 OK
r-release-linux-x86_64 1.1.3 4.91 145.26 150.17 OK
r-release-macos-arm64 1.1.3 1.00 46.00 47.00 OK
r-release-macos-x86_64 1.1.3 4.00 174.00 178.00 OK
r-release-windows-x86_64 1.1.3 8.00 211.00 219.00 OK
r-oldrel-macos-arm64 1.1.3 1.00 47.00 48.00 ERROR
r-oldrel-macos-x86_64 1.1.3 4.00 179.00 183.00 OK
r-oldrel-windows-x86_64 1.1.3 9.00 258.00 267.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' 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: *** caught segfault *** 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: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 2: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 7: eval_f(x0, ...) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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]]) mi = mi, opts = mi$options) 6: 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 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) {tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}) 8: }, error = function(e) {})system.time({ Traceback: 8: model <- mi$modelsystem.time({ 1: model <- mi$modelmi$logitFuncs$getMnlV(pars, d$X, d$scalePar) result <- NULL result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 8: 2: eval_f(x0, ...) tryCatch({ 3: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, system.time({ mi = mi, opts = mi$options)nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) mi = mi, opts = mi$options) }, error = function(e) { 5: }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSEtryCatchOne(expr, names, parentenv, handlers[[1L]]) }) 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]], ...) model$coefficients <- result$solution model <- mi$model model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations 6: tryCatchList(expr, classes, parentenv, handlers) model$status <- result$status 7: model$message <- result$message10: lapply(X = S, FUN = FUN, ...)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})11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) model$message <- result$message result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 14: 9: }tryCatch(expr, error = function(e) {FUN(X[[i]], ...)}) call <- conditionCall(e)10: lapply(X = S, FUN = FUN, ...) }, 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$message11: }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 9: doTryCatch(return(expr), name, parentenv, handler) 11: doTryCatch(return(expr), name, parentenv, handler) if (!is.null(call)) {12: 12: if (identical(call[[1L]], quote(doTryCatch))) FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchOne(expr, names, parentenv, handlers[[1L]]) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")tryCatchOne(expr, names, parentenv, handlers[[1L]])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) 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"))) { prefix <- paste("Error in", dcall, ": ")13: LONG <- 75L 13: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers) cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) sm <- strsplit(conditionMessage(e), "\n")[[1L]] 14: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) tryCatch(expr, error = function(e) { call <- conditionCall(e)15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (!is.null(call)) {14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) type = "b")17: FUN(X[[i]], ...) if (w > LONG) dcall <- deparse(call, nlines = 1L) prefix <- paste0(prefix, "\n ") prefix <- paste("Error in", dcall, ": ") } else prefix <- "Error : "18: if (identical(call[[1L]], quote(doTryCatch))) lapply(seq_len(cores), inner.do) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) LONG <- 75L call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) 19: prefix <- paste("Error in", dcall, ": ")parallel::mclapply(miList, runModel, mc.cores = numCores) 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") LONG <- 75L .Internal(printDeferredWarnings()) .Internal(seterrmessage(msg[1L])) } sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (!silent && isTRUE(getOption("show.error.messages"))) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")20: cat(msg, file = outFile) .Internal(printDeferredWarnings()) invisible(structure(msg, class = "try-error", condition = e)) if (is.na(w)) }) withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 21: }suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: 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))})sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 15: 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: withCallingHandlers(expr, warning = function(w) if (inherits(w, sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))17: FUN(X[[i]], ...)23: classes)) tryInvokeRestart("muffleWarning"))16: suppressMessages(suppressWarnings(parallel::mclapply(miList, 21: runModel, mc.cores = numCores)))suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))18: 17: 24: lapply(seq_len(cores), inner.do) FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores)19: classes)) tryInvokeRestart("muffleMessage")) 20: runMultistart(modelInputs)parallel::mclapply(miList, runModel, mc.cores = numCores)withCallingHandlers(expr, warning = function(w) if (inherits(w, 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, 20: classes)) tryInvokeRestart("muffleWarning")) runModel, mc.cores = numCores))) 24: 21: runMultistart(modelInputs)withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 25: 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: 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", An irrecoverable exception occurred. R is aborting now ... "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... 22: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... 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 ... 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-oldrel-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]]) 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) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: tryCatch({nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: 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", 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) {}) 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/RtmpIGWWhl/file96c73459fd00.rds") An irrecoverable exception occurred. R is aborting now ... 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("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/RtmpIGWWhl/file96c73459fd00.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() *** caught segfault *** address 0x110, cause 'invalid permissions' 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("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/RtmpIGWWhl/file96c73459fd00.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("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/RtmpIGWWhl/file96c73459fd00.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' *** 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) } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) *** caught segfault *** address 0x110, cause 'invalid permissions' 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("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/RtmpIGWWhl/file96c73459fd00.rds") An irrecoverable exception occurred. R is aborting now ... Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) Traceback: Traceback: 1: 1: 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 2: 6: tryCatchList(expr, classes, parentenv, handlers) 7: 2: eval_f(x0, ...)tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)eval_f(x0, ...) 3: Traceback: }, error = function(e) { }) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 1: mi = mi, opts = mi$options)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 4: doTryCatch(return(expr), name, parentenv, handler) 4: doTryCatch(return(expr), name, parentenv, handler) 8: system.time({ model <- mi$model 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) result <- NULL 6: tryCatch({tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }, error = function(e) { mi = mi, opts = mi$options) 5: }, error = function(e) { 2: })tryCatchOne(expr, names, parentenv, handlers[[1L]])eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }) mi = mi, opts = mi$options) if (!is.null(result)) { 6: model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective)tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, Traceback: 8: 4: model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) system.time({ 1: mi = mi, opts = mi$options) 9: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)FUN(X[[i]], ...) model <- mi$model}, error = function(e) { 10: doTryCatch(return(expr), name, parentenv, handler) 2: lapply(X = S, FUN = FUN, ...)eval_f(x0, ...) }) 8: system.time({ model <- mi$model result <- NULL 5: 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatchOne(expr, names, parentenv, handlers[[1L]]) tryCatch({ result <- NULL result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)11: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { })doTryCatch(return(expr), name, parentenv, handler) 12: }, error = function(e) { }) if (!is.null(result)) { if (!is.null(result)) { 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({tryCatchOne(expr, names, parentenv, handlers[[1L]]) mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) model$fail <- FALSE 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, model$fail <- FALSE mi = mi, opts = mi$options)}, error = function(e) {}) model$coefficients <- result$solution model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations 13: model$logLik <- as.numeric(-1 * result$objective)tryCatchList(expr, classes, parentenv, handlers) 7: 14: 8: tryCatch(expr, error = function(e) {system.time({ model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 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 call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) model$status <- result$status tryCatch({ model$message <- result$message10: }})lapply(X = S, FUN = FUN, ...) call <- sys.call(-4L) model$coefficients <- result$solution dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, model$logLik <- as.numeric(-1 * result$objective) mi = mi, opts = mi$options) model$iterations <- result$iterations11: 9: FUN(X[[i]], ...) sm <- strsplit(conditionMessage(e), "\n")[[1L]] model$status <- result$statusdoTryCatch(return(expr), name, parentenv, handler) 10: lapply(X = S, FUN = FUN, ...) 11: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")12: model$message <- result$message }tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (is.na(w)) doTryCatch(return(expr), name, parentenv, handler)})}, error = function(e) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } 9: FUN(X[[i]], ...) else prefix <- "Error : " }) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))10: 13: if (!silent && isTRUE(getOption("show.error.messages"))) {12: lapply(X = S, FUN = FUN, ...)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 11: 8: doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]])system.time({ cat(msg, file = outFile) .Internal(printDeferredWarnings()) } 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) { invisible(structure(msg, class = "try-error", condition = e))12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) sm <- strsplit(conditionMessage(e), "\n")[[1L]] 13: tryCatchList(expr, classes, parentenv, handlers) })14: tryCatch(expr, error = function(e) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 15: }) call <- conditionCall(e)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (!is.null(result)) { 13: tryCatchList(expr, classes, parentenv, handlers) if (!is.null(call)) { if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (identical(call[[1L]], quote(doTryCatch))) 17: FUN(X[[i]], ...)14: model$fail <- FALSEtryCatch(expr, error = function(e) { call <- sys.call(-4L) call <- conditionCall(e) if (!is.null(call)) { model$coefficients <- result$solution 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations if (identical(call[[1L]], quote(doTryCatch))) classes)) tryInvokeRestart("muffleWarning")) 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") dcall <- deparse(call, nlines = 1L) model$status <- result$status21: prefix <- paste("Error in", dcall, ": ") type = "b") model$message <- result$message if (w > LONG) }})suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) .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))}) 22: 9: FUN(X[[i]], ...) withCallingHandlers(expr, message = function(c) if (inherits(c, 15: prefix <- paste0(prefix, "\n ")10: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) LONG <- 75L16: lapply(X = S, FUN = FUN, ...) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") } 11: doTryCatch(return(expr), name, parentenv, handler) if (is.na(w)) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " else prefix <- "Error : "12: classes)) tryInvokeRestart("muffleMessage")) msg <- paste0(prefix, conditionMessage(e), "\n")17: msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)FUN(X[[i]], ...) .Internal(printDeferredWarnings()) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: tryCatchOne(expr, names, parentenv, handlers[[1L]]) } .Internal(seterrmessage(msg[1L]))withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 13: 22: invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)withCallingHandlers(expr, message = function(c) if (inherits(c, if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...)23: classes)) tryInvokeRestart("muffleMessage"))tryCatchList(expr, classes, parentenv, handlers) invisible(structure(msg, class = "try-error", condition = e))}) suppressMessages(suppressWarnings(parallel::mclapply(miList, 18: runModel, mc.cores = numCores))) 15: 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { 24: 23: lapply(seq_len(cores), inner.do)suppressMessages(suppressWarnings(parallel::mclapply(miList, try(lapply(X = S, FUN = FUN, ...), silent = TRUE) runMultistart(modelInputs) 25: runModel, mc.cores = numCores))) 19: 24: parallel::mclapply(miList, runModel, mc.cores = numCores) logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)runMultistart(modelInputs) "brand"), scalePar = "price", numMultiStarts = 10) 25: 20: 26: eval(expr, envir) prefix <- paste("Error in", dcall, ": ") 27: eval(expr, envir)withCallingHandlers(expr, warning = function(w) if (inherits(w, 16: LONG <- 75L28: withVisible(eval(expr, envir)) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") }29: "brand"), scalePar = "price", numMultiStarts = 10) else prefix <- "Error : "withCallingHandlers(code, error = function (e) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings())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) {rlang::entrace(e), message = function (cnd) watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) {{ invisible(structure(msg, class = "try-error", condition = e)) watcher$capture_plot_and_output()17: classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) if (getOption("warn") >= 2 || getOption("warn") < 0) { if (on_message$capture) { watcher$push(cnd)})FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) } 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()22: cnd <- sanitize_call(cnd) return()withCallingHandlers(expr, message = function(c) if (inherits(c, watcher$push(cnd) classes)) tryInvokeRestart("muffleMessage"))15: } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) switch(on_error, continue = invokeRestart("eval_continue"), watcher$push(cnd) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) try(lapply(X = S, FUN = FUN, ...), silent = TRUE)19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, stop = invokeRestart("eval_stop"), error = NULL) 24: }) } classes)) tryInvokeRestart("muffleWarning"))16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 30: 21: runMultistart(modelInputs) if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) {suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))17: eval(call)23: FUN(X[[i]], ...)suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: watcher$capture_plot_and_output()logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", cnd <- sanitize_call(cnd) "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) watcher$push(cnd)31: eval(call) switch(on_error, continue = invokeRestart("eval_continue"), 25: 32: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 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) } TRUE18: }, handlers)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")) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) stop = invokeRestart("eval_stop"), error = NULL)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: }) 30: withRestarts(with_handlers({{ eval(call) for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: watcher$capture_plot_and_output()26: eval(expr, envir) 27: eval(expr, envir) if (on_message$capture) { 28: withVisible(eval(expr, envir)) watcher$push(cnd)31: suppressMessages(suppressWarnings(parallel::mclapply(miList, } if (on_message$silence) { watcher$capture_plot_and_output()eval(call)29: runModel, mc.cores = numCores))) invokeRestart("muffleMessage") watcher$print_value(ev$value, ev$visible, envir)withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { } TRUE watcher$push(cnd)24: runMultistart(modelInputs) }32: with_handlers({ for (expr in tle$exprs) { }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (on_message$silence) {25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } } TRUE}, handlers) invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: return()}, warning = function (cnd) "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: evaluate::evaluate(...) 41: {withRestartList(expr, restarts[-nr]) 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)) 36: doWithOneRestart(return(expr), restart)42: in_dir(input_dir(), expr) if (on_warning$capture) {rlang::entrace(e), message = function (cnd) cnd <- sanitize_call(cnd) 43: 37: if (getOption("warn") >= 2 || getOption("warn") < 0) { watcher$push(cnd) }in_input_dir(evaluate(code, envir = env, new_device = FALSE, withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ if (on_warning$silence) { return() for (expr in tle$exprs) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) ev <- withVisible(eval(expr, envir)) } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { switch(on_error, continue = invokeRestart("eval_continue"), keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, 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))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) 48: watcher$capture_plot_and_output()withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {{}) invokeRestart("muffleWarning") watcher$capture_plot_and_output() }}, 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)}) if (on_message$capture) { 30: eval(call) 31: eval(call) 32: with_handlers({ if (progress && is.function(pb$interrupt)) watcher$print_value(ev$value, ev$visible, envir) for (expr in tle$exprs) {30: eval(call) watcher$push(cnd) } if (on_message$silence) { pb$interrupt() 31: eval(call) ev <- withVisible(eval(expr, envir)) if (is_R_CMD_build() || is_R_CMD_check()) invokeRestart("muffleMessage") } error <<- format(e) watcher$capture_plot_and_output()32: watcher$print_value(ev$value, ev$visible, envir) })with_handlers({ 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), }, warning = function (cnd) } } 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) { for (expr in tle$exprs) { 0L if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } else 2L error = function(e) { TRUE}, handlers) 33: TRUE watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) }, output_handler = knit_handlers(options$render, options))}, handlers) doWithOneRestart(return(expr), restart) 33: if (progress && is.function(pb$interrupt)) 34: pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: watcher$push(cnd)withOneRestart(expr, restarts[[1L]])doWithOneRestart(return(expr), restart)xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 42: 35: withRestartList(expr, restarts[-nr])in_dir(input_dir(), expr) } 43: error = function(e) {in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (on_warning$silence) { invokeRestart("muffleWarning") keep_message = if (is.numeric(options$message)) TRUE else options$message, }36: if (progress && is.function(pb$interrupt)) }, error = function (cnd) doWithOneRestart(return(expr), restart)34: withOneRestart(expr, restarts[[1L]]) stop_on_error = if (is.numeric(options$error)) options$error else { { 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)})35: if (options$error && options$include) 0L else 2LwithRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) }, output_handler = knit_handlers(options$render, options))) pb$interrupt() 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 44: 30: if (is_R_CMD_build() || is_R_CMD_check()) eval(call)37: eng_r(options) 45: block_exec(params) 31: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])eval(call) 32: with_handlers({ error <<- format(e)46: 39: }), 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) for (expr in tle$exprs) {call_block(x) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) withRestarts(with_handlers({38: 52: withRestartList(expr, restarts) 39: for (expr in tle$exprs) {47: withRestarts(with_handlers({knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) ev <- withVisible(eval(expr, envir))33: for (expr in tle$exprs) {process_group(group) ev <- withVisible(eval(expr, envir))doWithOneRestart(return(expr), restart) watcher$capture_plot_and_output() 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), watcher$capture_plot_and_output() output_dir = getwd(), ...) watcher$print_value(ev$value, ev$visible, envir) } 54: TRUE watcher$print_value(ev$value, ev$visible, envir)vweave_rmarkdown(...) 55: 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) engine$weave(file, quiet = quiet, encoding = enc)34: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) } 56: doTryCatch(return(expr), name, parentenv, handler)withOneRestart(expr, restarts[[1L]]) TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 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()) 40: 35: withRestartList(expr, restarts[-nr])evaluate::evaluate(...) 40: 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 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)) error <<- format(e)42: }), list(rlang_trace_top_env = knit_global()))58: tryCatchList(expr, classes, parentenv, handlers) in_dir(input_dir(), expr)59: tryCatch({36: doWithOneRestart(return(expr), restart)evaluate::evaluate(...) 50: 37: 41: 43: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) engine$weave(file, quiet = quiet, encoding = enc) in_input_dir(evaluate(code, envir = env, new_device = FALSE, 38: 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) { keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 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 OK <<- FALSE keep_message = if (is.numeric(options$message)) TRUE else options$message, else 2L stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) }, output_handler = knit_handlers(options$render, options)) 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) { keep_message = if (is.numeric(options$message)) TRUE else options$message, setwd(wd) 0L stop_on_error = if (is.numeric(options$error)) options$error else { message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", if (options$error && options$include) write_utf8(res, output %n% stdout()) file, conditionMessage(e))) 0L else 2L else 2L42: 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) }, output_handler = knit_handlers(options$render, options))) 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) 45: block_exec(params) }, output_handler = knit_handlers(options$render, options)) 56: 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: })44: 46: 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/RtmpIGWWhl/file96c73459fd00.rds") An irrecoverable exception occurred. R is aborting now ... 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()doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers)call_block(x) call_block(x) if (is_R_CMD_build() || is_R_CMD_check()) 47: process_group(group) error <<- format(e)48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), }), list(rlang_trace_top_env = knit_global()))59: tryCatch({ pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) engine$weave(file, quiet = quiet, encoding = enc)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), setwd(startdir) }) error = function(e) { 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/RtmpIGWWhl/file96c73459fd00.rds") An irrecoverable exception occurred. R is aborting now ... 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), if (progress && is.function(pb$interrupt)) 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: pb$interrupt()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) { error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() OK <<- FALSE if (is_R_CMD_build() || is_R_CMD_check()) if (is_R_CMD_build() || is_R_CMD_check()) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: error <<- format(e)tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 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)) TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c73459fd00.rds") An irrecoverable exception occurred. R is aborting now ... }), list(rlang_trace_top_env = knit_global())) 50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 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) error = function(e) { 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 (progress && is.function(pb$interrupt)) 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/RtmpIGWWhl/file96c73459fd00.rds") 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) 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/RtmpIGWWhl/file96c73459fd00.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' 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, 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() 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) *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) *** caught segfault *** address 0x110, cause 'invalid permissions' 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.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c71e3c6501.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: 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) {})FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 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) 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) 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) 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") 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) if (w > LONG) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 7: tryCatch({ 9: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({FUN(X[[i]], ...) 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()) }10: model <- mi$model invisible(structure(msg, class = "try-error", condition = e))}) 15: result <- NULL tryCatch({lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) {18: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)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")) *** caught segfault *** address 0x110, cause 'invalid permissions' 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) }, error = function(e) {23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) if (identical(call[[1L]], quote(doTryCatch))) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 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")24: 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler)runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 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()) } 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) 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: 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd)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) } if (on_message$silence) { dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) 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)}) 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"))) {30: eval(call) 31: eval(call) 32: cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))with_handlers({}) lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores)15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...)20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 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")) for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } 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, 21: Traceback: 1: runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: TRUEmi$logitFuncs$getMnlV(pars, d$X, d$scalePar)}, handlers)logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: 2: eval_f(x0, ...) withCallingHandlers(expr, message = function(c) if (inherits(c, 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) classes)) tryInvokeRestart("muffleMessage")) mi = mi, opts = mi$options)33: doWithOneRestart(return(expr), restart) 34: 4: withOneRestart(expr, restarts[[1L]]) 26: doTryCatch(return(expr), name, parentenv, handler) eval(expr, envir) 5: 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) tryCatchOne(expr, names, parentenv, handlers[[1L]])27: eval(expr, envir) 6: 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))28: 24: tryCatchList(expr, classes, parentenv, handlers) 7: withVisible(eval(expr, envir)) 29: runMultistart(modelInputs)tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 25: withCallingHandlers(code, error = function (e) logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", mi = mi, opts = mi$options)rlang::entrace(e), message = function (cnd) }, error = function(e) { "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate){})38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ 8: for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() 26: eval(expr, envir) 27: eval(expr, envir) 28: watcher$capture_plot_and_output() if (on_message$capture) { *** caught segfault *** watcher$print_value(ev$value, ev$visible, envir)system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, address 0x110, cause 'invalid permissions' mi = mi, opts = mi$options) }, error = function(e) { } watcher$push(cnd) TRUE } if (on_message$silence) { })}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)withVisible(eval(expr, envir)) if (!is.null(result)) { invokeRestart("muffleMessage")40: 29: 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: }withCallingHandlers(code, error = function (e) }, warning = function (cnd) rlang::entrace(e), message = function (cnd) {evaluate::evaluate(...) watcher$capture_plot_and_output()41: if (on_message$capture) { watcher$push(cnd)lapply(X = S, FUN = FUN, ...){ 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$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) {11: if (getOption("warn") >= 2 || getOption("warn") < 0) { stop_on_error = if (is.numeric(options$error)) options$error else { return()doTryCatch(return(expr), name, parentenv, handler) } watcher$capture_plot_and_output() *** caught segfault *** 12: return() if (on_warning$capture) { }tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (options$error && options$include) 0L else 2Laddress 0x110, cause 'invalid permissions' cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { watcher$capture_plot_and_output()13: if (on_warning$capture) { }, output_handler = knit_handlers(options$render, options)) tryCatchList(expr, classes, parentenv, handlers)42: cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") invokeRestart("muffleWarning")14: in_dir(input_dir(), expr) } Traceback: }, error = function (cnd) 1: tryCatch(expr, error = function(e) {mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: {43: call <- conditionCall(e)eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, in_input_dir(evaluate(code, envir = env, new_device = FALSE, mi = mi, opts = mi$options) watcher$capture_plot_and_output() keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, } keep_message = if (is.numeric(options$message)) TRUE else options$message, cnd <- sanitize_call(cnd)}, error = function (cnd) 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) 4: watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)doTryCatch(return(expr), name, parentenv, handler) if (!is.null(call)) { watcher$capture_plot_and_output() 5: if (identical(call[[1L]], quote(doTryCatch))) cnd <- sanitize_call(cnd) watcher$push(cnd)tryCatchOne(expr, names, parentenv, handlers[[1L]])45: block_exec(params) switch(on_error, continue = invokeRestart("eval_continue"), call <- sys.call(-4L) stop = invokeRestart("eval_stop"), error = NULL) }) 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])) 6: if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings())46: 30: tryCatchList(expr, classes, parentenv, handlers)eval(call) 31: eval(call) } 32: with_handlers({ invisible(structure(msg, class = "try-error", condition = e))}) 30: call_block(x) for (expr in tle$exprs) {eval(call) 15: ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 31: 47: process_group(group) 48: eval(call) Traceback: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {33: if (progress && is.function(pb$interrupt)) 32: with_handlers({16: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) doWithOneRestart(return(expr), restart) pb$interrupt() 7: 2: for (expr in tle$exprs) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (is_R_CMD_build() || is_R_CMD_check()) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)eval_f(x0, ...) 34: 33: error <<- format(e) 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$modeldoWithOneRestart(return(expr), restart) 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)) { }) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 34: 17: withOneRestart(expr, restarts[[1L]])withOneRestart(expr, restarts[[1L]]) 3: FUN(X[[i]], ...) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: 18: lapply(seq_len(cores), inner.do)withRestartList(expr, restarts)nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) mi = mi, opts = mi$options) model$fail <- FALSE35: model$coefficients <- result$solution error = function(e) {19: 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) watcher$capture_plot_and_output()parallel::mclapply(miList, runModel, mc.cores = numCores) withRestartList(expr, restarts[-nr]) model$logLik <- as.numeric(-1 * result$objective) if (progress && is.function(pb$interrupt)) 6: model$iterations <- result$iterations 36: doWithOneRestart(return(expr), restart) 37: pb$interrupt() watcher$print_value(ev$value, ev$visible, envir) } TRUEtryCatchList(expr, classes, parentenv, handlers)withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 7: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 38: tryCatch({ if (is_R_CMD_build() || is_R_CMD_check()) 20: 40: 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)) withCallingHandlers(expr, warning = function(w) if (inherits(w, 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) } result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, model$status <- result$status classes)) tryInvokeRestart("muffleWarning")) TRUE mi = mi, opts = mi$options) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) {}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) setwd(wd) evaluate::evaluate(...) model$message <- result$message } })}, error = function(e) {}) 9: write_utf8(res, output %n% stdout()) 21: 8: FUN(X[[i]], ...)41: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, *** caught segfault *** 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)) system.time({22: paste0("\nQuitting from ", loc, if (!is.null(error)) address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' 40: 42: withCallingHandlers(expr, message = function(c) if (inherits(c, in_dir(input_dir(), expr)evaluate::evaluate(...) 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(), ...) classes)) tryInvokeRestart("muffleMessage"))41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 54: vweave_rmarkdown(...)43: 23: 10: model <- mi$model keep_message = if (is.numeric(options$message)) TRUE else options$message, suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) result <- NULL stop_on_error = if (is.numeric(options$error)) options$error else {in_input_dir(evaluate(code, envir = env, new_device = FALSE, tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: lapply(X = S, FUN = FUN, ...) *** caught segfault *** address 0x110, cause 'invalid permissions' mi = mi, opts = mi$options) keep_message = if (is.numeric(options$message)) TRUE else options$message, 55: }, error = function(e) { }) if (!is.null(result)) {11: 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)doTryCatch(return(expr), name, parentenv, handler) stop_on_error = if (is.numeric(options$error)) options$error else {in_input_dir(evaluate(code, envir = env, new_device = FALSE, model$fail <- 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) 26: eval(expr, envir) model$coefficients <- result$solutionengine$weave(file, quiet = quiet, encoding = enc)27: 0L 56: doTryCatch(return(expr), name, parentenv, handler)12: if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) model$logLik <- as.numeric(-1 * result$objective) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) else 2L44: }, output_handler = knit_handlers(options$render, options)))eng_r(options) 45: block_exec(params) 46: call_block(x) 47: process_group(group) model$iterations <- result$iterations57: eval(expr, envir)14: 28: withVisible(eval(expr, envir)) 29: tryCatch(expr, error = function(e) {withCallingHandlers(code, error = function (e) tryCatchOne(expr, names, parentenv, handlers[[1L]]) model$status <- result$statusrlang::entrace(e), message = function (cnd) call <- conditionCall(e) model$message <- result$message }}){ 58: tryCatchList(expr, classes, parentenv, handlers) watcher$capture_plot_and_output()59: 48: 44: 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 (!is.null(call)) {eng_r(options) tryCatch({ if (progress && is.function(pb$interrupt)) 9: FUN(X[[i]], ...) if (on_message$capture) { Traceback: engine$weave(file, quiet = quiet, encoding = enc) if (identical(call[[1L]], quote(doTryCatch))) pb$interrupt()10: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) if (is_R_CMD_build() || is_R_CMD_check()) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) watcher$push(cnd) call <- sys.call(-4L) setwd(startdir) 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() dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L output <- find_vignette_product(name, by = "weave", engine = engine) Traceback: 3: if (is_R_CMD_build() || is_R_CMD_check()) lapply(X = S, FUN = FUN, ...) 1: if (!have.makefile && vignette_is_tex(output)) { } 2: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (on_message$silence) {mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) invokeRestart("muffleMessage") } texi2pdf(file = output, clean = FALSE, quiet = quiet) 2: eval_f(x0, ...)45: if (is.na(w)) block_exec(params) 46: call_block(x) 47: process_group(group) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { output <- find_vignette_product(name, by = "texi2pdf", eval_f(x0, ...)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)}, 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) { setwd(wd) engine = engine) invokeRestart("muffleWarning") }}, error = function (cnd) write_utf8(res, output %n% stdout()) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 11: 3: { 3: write_utf8(res, output %n% stdout())doTryCatch(return(expr), name, parentenv, handler) 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) mi = mi, opts = mi$options) paste0("\nQuitting from ", loc, if (!is.null(error)) nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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: 4: 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) {doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) mi = mi, opts = mi$options) paste0("\n", rule(), error, "\n", rule())) } 7: paste0("\nQuitting from ", loc, if (!is.null(error)) tryCatch({withCallingHandlers(expr, message = function(c) if (inherits(c, }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) result <- 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)33: call <- conditionCall(e)24: mi = mi, opts = mi$options) 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 ")}, error = function(e) { if (!is.null(call)) {doWithOneRestart(return(expr), restart) 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") } if (identical(call[[1L]], quote(doTryCatch))) 4: })51: }, warning = function (cnd) paste0("\n", rule(), error, "\n", rule()))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(...) }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 8: system.time({ model <- mi$model doTryCatch(return(expr), name, parentenv, handler) 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 ") } result <- NULL 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()) } 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({51: process_file(text, output)55: else prefix <- "Error : " tryCatch({ }{ 34: msg <- paste0(prefix, conditionMessage(e), "\n") invisible(structure(msg, class = "try-error", condition = e)) 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$model60: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", if (getOption("warn") >= 2 || getOption("warn") < 0) {})52: engine$weave(file, quiet = quiet, encoding = enc)knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c71e3c6501.rds")withOneRestart(expr, restarts[[1L]]) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) result <- NULL56: return() tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) mi = mi, opts = mi$options) } watcher$capture_plot_and_output()35: .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))}) }, error = function(e) { 18: lapply(seq_len(cores), inner.do) if (on_warning$capture) {doTryCatch(return(expr), name, parentenv, handler)15: An irrecoverable exception occurred. R is aborting now ... withRestartList(expr, restarts[-nr])55: cnd <- sanitize_call(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 model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler)engine$weave(file, quiet = quiet, encoding = enc)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }, 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 }}) 56: watcher$push(cnd) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: doTryCatch(return(expr), name, parentenv, handler)36: 19: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 57: doWithOneRestart(return(expr), restart) } 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: 9: 57: 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])FUN(X[[i]], ...) if (on_warning$silence) {tryCatchOne(expr, names, parentenv, handlers[[1L]])19: parallel::mclapply(miList, runModel, mc.cores = numCores)withRestartList(expr, restarts) 58: tryCatchList(expr, classes, parentenv, handlers) 59: tryCatch({58: engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)13: if (!have.makefile && vignette_is_tex(output)) {20: 10: invokeRestart("muffleWarning")tryCatchList(expr, classes, parentenv, handlers) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()lapply(X = S, FUN = FUN, ...) watcher$print_value(ev$value, ev$visible, envir) 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]] texi2pdf(file = output, clean = FALSE, quiet = quiet)tryCatchList(expr, classes, parentenv, handlers)withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) } 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)))})14: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}, error = function (cnd) parallel::mclapply(miList, runModel, mc.cores = numCores)tryCatch(expr, error = function(e) { if (is.na(w)) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 21: { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], } type = "b")20: 59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)withCallingHandlers(expr, warning = function(w) if (inherits(w, watcher$capture_plot_and_output() TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c71e3c6501.rds") cnd <- sanitize_call(cnd)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) if (w > LONG) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) call <- conditionCall(e) prefix <- paste0(prefix, "\n ") watcher$push(cnd) if (!have.makefile && vignette_is_tex(output)) { if (!is.null(call)) { classes)) tryInvokeRestart("muffleWarning")) } switch(on_error, continue = invokeRestart("eval_continue"), 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: 24: An irrecoverable exception occurred. R is aborting now ... runMultistart(modelInputs) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75LwithCallingHandlers(expr, message = function(c) if (inherits(c, 25: stop = invokeRestart("eval_stop"), error = NULL) else prefix <- "Error : " texi2pdf(file = output, clean = FALSE, quiet = quiet) sm <- strsplit(conditionMessage(e), "\n")[[1L]] TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: output <- find_vignette_product(name, by = "texi2pdf", 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)) classes)) tryInvokeRestart("muffleMessage"))})evaluate::evaluate(...) engine = engine)logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings())}) } } 41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) keep_message = if (is.numeric(options$message)) TRUE else options$message, invisible(structure(msg, class = "try-error", condition = e)) file, conditionMessage(e))) 30: }) stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 15: 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, runModel, mc.cores = numCores)))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) 24: runMultistart(modelInputs)26: keep_message = if (is.numeric(options$message)) TRUE else options$message, eval(expr, envir)}) 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/RtmpIGWWhl/file96c71e3c6501.rds") An irrecoverable exception occurred. R is aborting now ... 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: 20: 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) stop_on_error = if (is.numeric(options$error)) options$error else {eval(call)withCallingHandlers(expr, message = function(c) if (inherits(c, 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) { classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) if (options$error && options$include) withCallingHandlers(expr, warning = function(w) if (inherits(w, 0L else 2L }, output_handler = knit_handlers(options$render, options))) 26: eval(expr, envir) 27: eval(expr, envir) ev <- withVisible(eval(expr, envir))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$capture_plot_and_output() 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 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: 31: watcher$push(cnd)28: withRestartList(expr, restarts) 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) classes)) tryInvokeRestart("muffleWarning")) 29: withCallingHandlers(code, error = function (e) 32: with_handlers({ for (expr in tle$exprs) {rlang::entrace(e), message = function (cnd) 21: ev <- withVisible(eval(expr, envir))eval(call) 39: withRestarts(with_handlers({ watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) for (expr in tle$exprs) {{ } watcher$capture_plot_and_output()47: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) ev <- withVisible(eval(expr, envir)) TRUE 31: watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) }}, handlers) 33: doWithOneRestart(return(expr), restart) process_group(group) if (on_message$capture) {eval(call) TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 22: 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) watcher$push(cnd)32: 34: 40: withCallingHandlers(expr, message = function(c) if (inherits(c, withOneRestart(expr, restarts[[1L]]) } classes)) tryInvokeRestart("muffleMessage")) 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), evaluate::evaluate(...) if (on_message$silence) {35: invokeRestart("muffleMessage")with_handlers({ }withRestartList(expr, restarts[-nr]) error = function(e) { 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, 36: for (expr in tle$exprs) { if (progress && is.function(pb$interrupt)) }, warning = function (cnd) stop_on_error = if (is.numeric(options$error)) options$error else { pb$interrupt()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){ if (is_R_CMD_build() || is_R_CMD_check()) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() 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), if (getOption("warn") >= 2 || getOption("warn") < 0) { watcher$print_value(ev$value, ev$visible, envir) } if (options$error && options$include) doWithOneRestart(return(expr), restart) return() error = function(e) { } if (progress && is.function(pb$interrupt)) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 0L pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) watcher$capture_plot_and_output() TRUE39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))}, handlers) }), list(rlang_trace_top_env = knit_global())), function(loc) { else 2L 33: 26: if (on_warning$capture) { watcher$capture_plot_and_output()doWithOneRestart(return(expr), restart) cnd <- sanitize_call(cnd) }, output_handler = knit_handlers(options$render, options)) watcher$push(cnd) 42: in_dir(input_dir(), expr) watcher$print_value(ev$value, ev$visible, envir)eval(expr, envir) setwd(wd) } }34: withOneRestart(expr, restarts[[1L]]) TRUE }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (on_warning$silence) { invokeRestart("muffleWarning") 40: 27: 35: write_utf8(res, output %n% stdout())evaluate::evaluate(...)withRestartList(expr, restarts[-nr]) 43: paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))in_input_dir(evaluate(code, envir = env, new_device = FALSE, }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)36: doWithOneRestart(return(expr), restart) eval(expr, envir) 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) 37: }withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])41: 0Levaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }, error = function (cnd) keep_message = if (is.numeric(options$message)) TRUE else options$message, 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(), stop_on_error = if (is.numeric(options$error)) options$error else {38: watcher$capture_plot_and_output() else 2L }, output_handler = knit_handlers(options$render, options)))withRestartList(expr, restarts) if (options$error && options$include) 28: withVisible(eval(expr, envir)) cnd <- sanitize_call(cnd) 29: output_dir = getwd(), ...) watcher$push(cnd)39: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) {44: 0L else 2L }, output_handler = knit_handlers(options$render, options)) switch(on_error, continue = invokeRestart("eval_continue"), eng_r(options) stop = invokeRestart("eval_stop"), error = NULL) watcher$capture_plot_and_output()withRestarts(with_handlers({ if (on_message$capture) {42: in_dir(input_dir(), expr) }) for (expr in tle$exprs) { 45: block_exec(params) 46: call_block(x) 47: process_group(group) ev <- withVisible(eval(expr, envir))48: 43: 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]]) watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) 30: watcher$capture_plot_and_output()withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: error = function(e) {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: 58: in_input_dir(evaluate(code, envir = env, new_device = FALSE, eval(call){ if (getOption("warn") >= 2 || getOption("warn") < 0) { return() if (progress && is.function(pb$interrupt)) 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)tryCatchList(expr, classes, parentenv, handlers) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 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), watcher$capture_plot_and_output()45: 59: keep_message = if (is.numeric(options$message)) TRUE else options$message, block_exec(params)31: error = function(e) {tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) 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: if (!have.makefile && vignette_is_tex(output)) {eval(call) texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), engine = engine) if (on_warning$capture) { error = function(e) { stop_on_error = if (is.numeric(options$error)) options$error else {46: call_block(x)32: 47: if (options$error && options$include) if (progress && is.function(pb$interrupt)) process_group(group) 0Lwith_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) } pb$interrupt()}, error = function(e) {48: OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", if (is_R_CMD_build() || is_R_CMD_check()) withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), else 2L error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) error = function(e) {34: write_utf8(res, output %n% stdout()) file, conditionMessage(e)))}) 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", }, output_handler = knit_handlers(options$render, options))) TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c71e3c6501.rds") An irrecoverable exception occurred. R is aborting now ... if (progress && is.function(pb$interrupt)) withOneRestart(expr, restarts[[1L]]) cnd <- sanitize_call(cnd) pb$interrupt()35: if (is_R_CMD_build() || is_R_CMD_check()) 44: paste0("\nQuitting from ", loc, if (!is.null(error)) watcher$push(cnd)eng_r(options) 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]]) }withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) error <<- format(e) 37: 58: if (on_warning$silence) { })45: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) invokeRestart("muffleWarning") }}, error = function (cnd) 38: {withRestartList(expr, restarts) block_exec(params) tryCatchList(expr, classes, parentenv, handlers) 49: watcher$capture_plot_and_output()46: call_block(x) with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 47: cnd <- sanitize_call(cnd)59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)process_group(group)39: watcher$push(cnd)withRestarts(with_handlers({ 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", 48: error = function(e) { switch(on_error, continue = invokeRestart("eval_continue"), engine = engine) stop = invokeRestart("eval_stop"), error = NULL) for (expr in tle$exprs) {withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), ev <- withVisible(eval(expr, envir)) error = function(e) { } watcher$capture_plot_and_output() if (progress && is.function(pb$interrupt)) }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) pb$interrupt() file, conditionMessage(e))) if (is_R_CMD_build() || is_R_CMD_check()) }) error <<- format(e) 30: }) if (progress && is.function(pb$interrupt)) eval(call)}) pb$interrupt() 31: if (is_R_CMD_build() || is_R_CMD_check()) 49: 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) {with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), if (progress && is.function(pb$interrupt)) error = function(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/RtmpIGWWhl/file96c71e3c6501.rds") An irrecoverable exception occurred. R is aborting now ... pb$interrupt() if (progress && is.function(pb$interrupt)) if (is_R_CMD_build() || is_R_CMD_check()) eval(call) pb$interrupt() error <<- format(e) if (is_R_CMD_build() || is_R_CMD_check()) }), list(rlang_trace_top_env = knit_global())), function(loc) { error <<- format(e) }), list(rlang_trace_top_env = knit_global())) setwd(wd)32: with_handlers({ for (expr in tle$exprs) {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)) 40: evaluate::evaluate(...) write_utf8(res, output %n% stdout()) pb$interrupt() ev <- withVisible(eval(expr, 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, if (is_R_CMD_build() || is_R_CMD_check()) paste0("\nQuitting from ", loc, if (!is.null(error)) stop_on_error = if (is.numeric(options$error)) options$error else { error <<- format(e) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) if (options$error && options$include) 51: }), list(rlang_trace_top_env = knit_global())), function(loc) { 0L else 2L }, output_handler = knit_handlers(options$render, options)) watcher$capture_plot_and_output()process_file(text, output) 52: watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) setwd(wd)33: doWithOneRestart(return(expr), restart) write_utf8(res, output %n% stdout()) 34: paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 42: withOneRestart(expr, restarts[[1L]])in_dir(input_dir(), expr)51: 35: withRestartList(expr, restarts[-nr]) 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(...) process_file(text, output)36: 43: 52: 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))) doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({44: eng_r(options) 45: block_exec(params) 46: call_block(x) 55: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 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, 47: stop_on_error = if (is.numeric(options$error)) options$error else {engine$weave(file, quiet = quiet, encoding = enc)process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) 54: pb$interrupt() if (options$error && options$include) 56: doTryCatch(return(expr), name, parentenv, handler) if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)57: vweave_rmarkdown(...) 0L else 2L }, output_handler = knit_handlers(options$render, options)) })55: 42: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler)in_dir(input_dir(), expr) 49: tryCatchOne(expr, names, parentenv, handlers[[1L]])57: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { 58: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchList(expr, classes, parentenv, handlers) if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) 58: tryCatchList(expr, classes, parentenv, handlers) 59: 59: 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)) tryCatch({ pb$interrupt()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) }43: if (is_R_CMD_build() || is_R_CMD_check()) engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)}, error = function(e) {in_input_dir(evaluate(code, envir = env, new_device = FALSE, 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) if (!have.makefile && vignette_is_tex(output)) {52: OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", texi2pdf(file = output, clean = FALSE, quiet = quiet) file, conditionMessage(e))) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }) keep_message = if (is.numeric(options$message)) TRUE else options$message, output <- find_vignette_product(name, by = "texi2pdf", engine = engine) stop_on_error = if (is.numeric(options$error)) options$error else { }knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: 53: block_exec(params)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)}, error = function(e) { 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 54: 46: call_block(x) TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c71e3c6501.rds")vweave_rmarkdown(...) OK <<- FALSE 47: message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 55: process_group(group) engine$weave(file, quiet = quiet, encoding = enc) 60: An irrecoverable exception occurred. R is aborting now ... 56: 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/RtmpIGWWhl/file96c71e3c6501.rds") 48: An irrecoverable exception occurred. R is aborting now ... doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]])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) 58: tryCatchList(expr, classes, parentenv, handlers) 59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) }), list(rlang_trace_top_env = knit_global())) 50: 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", 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) engine = engine) 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: }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})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/RtmpIGWWhl/file96c71e3c6501.rds") An irrecoverable exception occurred. R is aborting now ... }) 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/RtmpIGWWhl/file96c71e3c6501.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' 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/RtmpIGWWhl/file96c75f9df8c6.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 = 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/RtmpIGWWhl/file96c75f9df8c6.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 = 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/RtmpIGWWhl/file96c75f9df8c6.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 = 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/RtmpIGWWhl/file96c75f9df8c6.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' *** 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))}) Traceback: Traceback: 15: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) try(lapply(X = S, FUN = FUN, ...), silent = TRUE) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 2: 16: eval_f(x0, ...) 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, 3: classes)) tryInvokeRestart("muffleWarning")) 5: 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 2: 22: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) mi = mi, opts = mi$options)eval_f(x0, ...) 6: eval_f(x0, ...) tryCatchList(expr, classes, parentenv, handlers) 3: 23: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, suppressMessages(suppressWarnings(parallel::mclapply(miList, mi = mi, opts = mi$options) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: 4: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler) runModel, mc.cores = numCores))) 7: 24: runMultistart(modelInputs) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", tryCatch({ 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 4: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 26: doTryCatch(return(expr), name, parentenv, handler) 6: 5: eval(expr, envir)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({ 5: tryCatchList(expr, classes, parentenv, handlers) mi = mi, opts = mi$options)}, error = function(e) {}) 7: tryCatch({ model <- mi$model result <- NULL *** caught segfault *** 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 tryCatchOne(expr, names, parentenv, handlers[[1L]]) model$coefficients <- result$solution27: address 0x110, cause 'invalid permissions' eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) tryCatch({ 6: tryCatchList(expr, classes, parentenv, handlers) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)rlang::entrace(e), message = function (cnd) model$logLik <- as.numeric(-1 * result$objective){ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) watcher$capture_plot_and_output()}, error = function(e) { if (on_message$capture) { }) model$iterations <- result$iterations watcher$push(cnd) 7: model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) }, error = function(e) { 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) }) if (!is.null(result)) { 8: system.time({ model$fail <- FALSEtryCatch({ model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, } if (on_message$silence) {12: mi = mi, opts = mi$options) model$iterations <- result$iterations}, error = function(e) { invokeRestart("muffleMessage")tryCatchOne(expr, names, parentenv, handlers[[1L]]) model <- mi$model}) 13: tryCatchList(expr, classes, parentenv, handlers) }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) {14: result <- NULL tryCatch(expr, error = function(e) { tryCatch({ cnd <- sanitize_call(cnd) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, model$status <- result$status watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") 8: }}, error = function (cnd) model$message <- result$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)}) }system.time({ 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")30: }) mi = mi, opts = mi$options)eval(call) }, 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 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 if (w > LONG) 9: FUN(X[[i]], ...)31: model$coefficients <- result$solution } }) eval(call) 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, ...)10: 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 32: lapply(X = S, FUN = FUN, ...)11: prefix <- paste0(prefix, "\n ") }11: 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) 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()) 11: } } Traceback: doTryCatch(return(expr), name, parentenv, handler) TRUEdoTryCatch(return(expr), name, parentenv, handler) 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: }, handlers) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]]) 35: system.time({withRestartList(expr, restarts[-nr])doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) model <- mi$model invisible(structure(msg, class = "try-error", condition = e)) 12: 36: 13: tryCatchList(expr, classes, parentenv, handlers) 14: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])tryCatchOne(expr, names, parentenv, handlers[[1L]]) 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({12: for (expr in tle$exprs) { result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { ev <- withVisible(eval(expr, envir))}) })15: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (!is.null(result)) { tryCatch(expr, error = function(e) {13: tryCatchList(expr, classes, parentenv, handlers)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) watcher$capture_plot_and_output() call <- conditionCall(e) 16: 13: if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { prefix <- paste("Error in", dcall, ": ") watcher$print_value(ev$value, ev$visible, envir)tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (identical(call[[1L]], quote(doTryCatch))) 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) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) call <- sys.call(-4L) prefix <- paste0(prefix, "\n ") dcall <- deparse(call, nlines = 1L)17: FUN(X[[i]], ...) TRUE if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) }18: lapply(seq_len(cores), inner.do) model$fail <- FALSE else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) model$coefficients <- result$solution }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) call <- sys.call(-4L) .Internal(printDeferredWarnings()) } model$logLik <- as.numeric(-1 * result$objective) invisible(structure(msg, class = "try-error", condition = e)) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") model$iterations <- result$iterations40: 19: parallel::mclapply(miList, runModel, mc.cores = numCores) if (is.na(w)) }) dcall <- deparse(call, nlines = 1L) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], evaluate::evaluate(...) type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } prefix <- paste("Error in", dcall, ": ") model$status <- result$status else prefix <- "Error : " LONG <- 75L model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...)20: 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: 11: doTryCatch(return(expr), name, parentenv, handler) msg <- paste0(prefix, conditionMessage(e), "\n")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))41: .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)withCallingHandlers(expr, warning = function(w) if (inherits(w, 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) classes)) tryInvokeRestart("muffleWarning"))13: sm <- strsplit(conditionMessage(e), "\n")[[1L]] tryCatchList(expr, classes, parentenv, handlers) 17: 14: .Internal(printDeferredWarnings()) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) } if (is.na(w)) FUN(X[[i]], ...) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, type = "b") invisible(structure(msg, class = "try-error", condition = e))tryCatch(expr, error = function(e) {}) keep_message = if (is.numeric(options$message)) TRUE else options$message, 15: call <- conditionCall(e) if (!is.null(call)) {18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) stop_on_error = if (is.numeric(options$error)) options$error else { 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))20: if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) withCallingHandlers(expr, warning = function(w) if (inherits(w, prefix <- paste("Error in", dcall, ": ") classes)) tryInvokeRestart("muffleWarning")) LONG <- 75L if (options$error && options$include) 0L else 2L24: sm <- strsplit(conditionMessage(e), "\n")[[1L]] }, output_handler = knit_handlers(options$render, options))runMultistart(modelInputs) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 42: if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: in_dir(input_dir(), expr) }try(lapply(X = S, FUN = FUN, ...), silent = TRUE)25: 43: 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: if (w > LONG) 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: prefix <- paste0(prefix, "\n ")block_exec(params)withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: 16: eval(expr, envir)runMultistart(modelInputs) 46: }call_block(x) else prefix <- "Error : "sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) msg <- paste0(prefix, conditionMessage(e), "\n")27: else prefix <- "Error : "25: 47: eval(expr, envir) 28: withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) {logitr(data = cars_us, outcome = "choice", obsID = "obsnum", msg <- paste0(prefix, conditionMessage(e), "\n")process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) .Internal(seterrmessage(msg[1L])) pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", if (!silent && isTRUE(getOption("show.error.messages"))) { watcher$capture_plot_and_output() pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) 49: "bev150", "american", "japanese", "chinese", "skorean", .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) {18: "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) 26: eval(expr, envir) cat(msg, file = outFile)with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) .Internal(printDeferredWarnings()) } cat(msg, file = outFile) lapply(seq_len(cores), inner.do) if (on_message$capture) {27: eval(expr, envir) 28: withVisible(eval(expr, envir)) watcher$push(cnd) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) 29: withCallingHandlers(code, error = function (e) .Internal(printDeferredWarnings()) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: error <<- format(e)rlang::entrace(e), message = function (cnd) invisible(structure(msg, class = "try-error", condition = e))withCallingHandlers(expr, warning = function(w) if (inherits(w, }), list(rlang_trace_top_env = knit_global())) }{ watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) classes)) tryInvokeRestart("muffleWarning")) if (on_message$silence) { } invisible(structure(msg, class = "try-error", condition = 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()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { }) setwd(wd) invokeRestart("muffleMessage") if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { }15: }, warning = function (cnd) return() } write_utf8(res, output %n% stdout())try(lapply(X = S, FUN = FUN, ...), silent = TRUE)21: watcher$capture_plot_and_output(){ if (on_warning$capture) {16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) cnd <- sanitize_call(cnd) 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) 17: if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") paste0("\nQuitting from ", loc, if (!is.null(error)) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, paste0("\n", rule(), error, "\n", rule()))FUN(X[[i]], ...) watcher$capture_plot_and_output() if (on_warning$capture) {}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) }}, 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: 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(), ...) 18: 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: eval(call) cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output()lapply(seq_len(cores), inner.do) suppressMessages(suppressWarnings(parallel::mclapply(miList, 54: runModel, mc.cores = numCores)))19: cnd <- sanitize_call(cnd) watcher$push(cnd)31: eval(call)vweave_rmarkdown(...) 55: parallel::mclapply(miList, runModel, mc.cores = numCores) switch(on_error, continue = invokeRestart("eval_continue"), classes)) tryInvokeRestart("muffleWarning")) stop = invokeRestart("eval_stop"), error = NULL)32: with_handlers({engine$weave(file, quiet = quiet, encoding = enc) 56: for (expr in tle$exprs) {}) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 20: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]])withCallingHandlers(expr, warning = function(w) if (inherits(w, 24: ev <- withVisible(eval(expr, envir)) classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) watcher$capture_plot_and_output() 58: tryCatchList(expr, classes, parentenv, handlers) 59: watcher$print_value(ev$value, ev$visible, envir)runMultistart(modelInputs)tryCatch({ 22: 23: withCallingHandlers(expr, message = function(c) if (inherits(c, 30: eval(call)suppressMessages(suppressWarnings(parallel::mclapply(miList, engine$weave(file, quiet = quiet, encoding = enc) classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) setwd(startdir) runModel, mc.cores = numCores))) 25: 24: output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet)runMultistart(modelInputs)logitr(data = cars_us, outcome = "choice", obsID = "obsnum", output <- find_vignette_product(name, by = "texi2pdf", } TRUE}, handlers) 33: 31: pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", engine = engine) }}, error = function(e) { OK <<- FALSE "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 26: file, conditionMessage(e)))})24: eval(call)eval(expr, envir) doWithOneRestart(return(expr), restart) 32: 25: runMultistart(modelInputs) 27: 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", eval(expr, envir) TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c75f9df8c6.rds") An irrecoverable exception occurred. R is aborting now ... with_handlers({25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", 28: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", withVisible(eval(expr, envir)) 29: pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", 34: withCallingHandlers(code, error = function (e) withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10) scalePar = "price", robust = TRUE, numMultiStarts = 10)doWithOneRestart(return(expr), restart) rlang::entrace(e), message = function (cnd) 37: for (expr in tle$exprs) {26: ev <- withVisible(eval(expr, envir))26: eval(expr, envir)eval(expr, envir){ 27: eval(expr, envir) 28: withVisible(eval(expr, envir)) watcher$capture_plot_and_output()withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])27: 38: withRestartList(expr, restarts) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { watcher$capture_plot_and_output()eval(expr, envir) ev <- withVisible(eval(expr, envir)) watcher$print_value(ev$value, ev$visible, envir)29: watcher$capture_plot_and_output()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$capture) {28: watcher$push(cnd) watcher$print_value(ev$value, ev$visible, envir) if (on_message$silence) { } 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, } TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) keep_message = if (is.numeric(options$message)) TRUE else options$message, 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) stop_on_error = if (is.numeric(options$error)) options$error else {withVisible(eval(expr, envir)) invokeRestart("muffleMessage") if (options$error && options$include) } 0L}, warning = function (cnd) 36: doWithOneRestart(return(expr), restart) 37: }{ 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") }withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) if (on_message$silence) {29: }, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd)withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { switch(on_error, continue = invokeRestart("eval_continue"), 38: else 2LwithRestartList(expr, restarts) stop = invokeRestart("eval_stop"), error = NULL) watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) {}) invokeRestart("muffleMessage") 39: withRestarts(with_handlers({ for (expr in tle$exprs) { }, output_handler = knit_handlers(options$render, options)) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return()30: watcher$print_value(ev$value, ev$visible, envir)eval(call) } 42: } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) {}, warning = function (cnd) 31: 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{ invokeRestart("muffleWarning") }}, error = function (cnd) else 2L{ }eval(call) watcher$capture_plot_and_output() }, output_handler = knit_handlers(options$render, options))) if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } cnd <- sanitize_call(cnd) watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) TRUE watcher$push(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) switch(on_error, continue = invokeRestart("eval_continue"), 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) } stop = invokeRestart("eval_stop"), error = NULL) 40: evaluate::evaluate(...) }}) }, error = function (cnd) TRUE 44: 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: {30: 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() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), eng_r(options) stop = invokeRestart("eval_stop"), error = NULL) 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)))45: 44: eng_r(options) 45: }, handlers)eval(call) block_exec(params)31: block_exec(params) 46: call_block(x) 46: call_block(x)})47: process_group(group) eval(call) 30: eval(call) 31: eval(call) 32: 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 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) }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) error = function(e) { if (progress && is.function(pb$interrupt)) 33: TRUEdoWithOneRestart(return(expr), restart)37: pb$interrupt()47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), }, handlers) if (is_R_CMD_build() || is_R_CMD_check()) error = function(e) { 33: doWithOneRestart(return(expr), restart) error <<- format(e) 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) }) if (progress && is.function(pb$interrupt)) 34: 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])withOneRestart(expr, restarts[[1L]]) 38: pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) error = function(e) { }) 36: withRestartList(expr, restarts)doWithOneRestart(return(expr), restart) 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 if (progress && is.function(pb$interrupt)) }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) pb$interrupt()49: 37: 40: if (is_R_CMD_build() || is_R_CMD_check()) evaluate::evaluate(...)with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error <<- format(e) }), list(rlang_trace_top_env = knit_global())) 50: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 41: 35: 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)38: error = function(e) {withRestartList(expr, restarts[-nr])evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) keep_message = if (is.numeric(options$message)) TRUE else options$message, }), list(rlang_trace_top_env = knit_global())) }), list(rlang_trace_top_env = knit_global())), function(loc) {36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) withRestartList(expr, restarts) 50: 39: 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) withRestarts(with_handlers({39: stop_on_error = if (is.numeric(options$error)) options$error else {51: process_file(text, output)withRestarts(with_handlers({xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE error = function(e) { for (expr in tle$exprs) { if (progress && is.function(pb$interrupt)) pb$interrupt()}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) ev <- withVisible(eval(expr, envir)) }), list(rlang_trace_top_env = knit_global())), function(loc) {52: setwd(wd) watcher$capture_plot_and_output() if (options$error && options$include) 0L40: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 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 else 2L write_utf8(res, output %n% stdout()) }, output_handler = knit_handlers(options$render, options))evaluate::evaluate(...) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule())) 41: 42: }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)in_dir(input_dir(), expr) 51: process_file(text, output) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) }, output_handler = knit_handlers(options$render, options))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, 42: in_dir(input_dir(), expr) 43: 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) stop_on_error = if (is.numeric(options$error)) options$error else {53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), if (options$error && options$include) 53: 0Lrmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: 0L else 2Lin_input_dir(evaluate(code, envir = env, new_device = FALSE, output_dir = getwd(), ...) 54: vweave_rmarkdown(...) else 2L }, output_handler = knit_handlers(options$render, options)) 42: in_dir(input_dir(), expr) 43: 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)))in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }, output_handler = knit_handlers(options$render, options))) 44: engine$weave(file, quiet = quiet, encoding = enc) keep_message = if (is.numeric(options$message)) TRUE else options$message, 44: eng_r(options) 56: doTryCatch(return(expr), name, parentenv, handler)55: eng_r(options)45: engine$weave(file, quiet = quiet, encoding = enc) 57: 56: 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))) doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 45: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: block_exec(params)58: 44: eng_r(options) 45: tryCatchList(expr, classes, parentenv, handlers)46: block_exec(params) 59: call_block(x)46: tryCatchList(expr, classes, parentenv, handlers)block_exec(params)tryCatch({ 59: engine$weave(file, quiet = quiet, encoding = enc)tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)call_block(x)46: output <- find_vignette_product(name, by = "weave", engine = engine)call_block(x) setwd(startdir)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() 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) }47: if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) })}, error = function(e) { if (!have.makefile && vignette_is_tex(output)) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", texi2pdf(file = output, clean = FALSE, quiet = quiet)49: file, conditionMessage(e)))47: })process_group(group) with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) output <- find_vignette_product(name, by = "texi2pdf", 60: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) engine = engine)process_group(group) 48: }withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error <<- format(e) TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c75f9df8c6.rds")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: }), list(rlang_trace_top_env = knit_global())) 50: 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 ... }, error = function(e) { pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global()))xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) OK <<- FALSE error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) 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/RtmpIGWWhl/file96c75f9df8c6.rds") pb$interrupt()50: if (is_R_CMD_build() || is_R_CMD_check()) }) 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())xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 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: An irrecoverable exception occurred. R is aborting now ... paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) error = function(e) { 51: process_file(text, output) if (progress && is.function(pb$interrupt)) pb$interrupt() 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]])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: 58: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers) 59: tryCatch({ 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: tryCatch({ if (is_R_CMD_build() || is_R_CMD_check()) 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 <<- format(e) engine$weave(file, quiet = quiet, encoding = enc) }), 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: setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)}, error = function(e) { OK <<- FALSE 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) {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(), OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: output_dir = getwd(), ...) 54: vweave_rmarkdown(...) 55: engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 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/RtmpIGWWhl/file96c75f9df8c6.rds") 57: file, conditionMessage(e)))}) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)60: 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", tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", An irrecoverable exception occurred. R is aborting now ... engine = engine) TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c75f9df8c6.rds") An irrecoverable exception occurred. R is aborting now ... }}, 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/RtmpIGWWhl/file96c75f9df8c6.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' *** 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) Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) 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) 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) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 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) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = 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) { })}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 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 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 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) Traceback: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: 21: 1: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: prefix <- paste("Error in", dcall, ": ")withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)runMultistart(modelInputs) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] 2: eval_f(x0, ...) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 3: 26: if (is.na(w)) eval(expr, envir)nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 27: eval(expr, envir) 4: 28: *** caught segfault *** withVisible(eval(expr, envir)) address 0x110, cause 'invalid permissions' doTryCatch(return(expr), name, parentenv, handler) *** caught segfault *** 29: eval_f(x0, ...) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], address 0x110, cause 'invalid permissions' 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, type = "b") 3: mi = mi, opts = mi$options)nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, withCallingHandlers(code, error = function (e) mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (w > LONG) rlang::entrace(e), message = function (cnd) *** caught segfault *** }, error = function(e) {}) 8: system.time({address 0x110, cause 'invalid permissions' { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) model <- mi$model result <- NULL tryCatch({ *** caught segfault *** } if (on_message$silence) { prefix <- paste0(prefix, "\n ")address 0x110, cause 'invalid permissions' invokeRestart("muffleMessage") 6: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatchList(expr, classes, parentenv, handlers) 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 else prefix <- "Error : " 7: tryCatch({ msg <- paste0(prefix, conditionMessage(e), "\n") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, cnd <- sanitize_call(cnd) .Internal(seterrmessage(msg[1L])) } if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) watcher$push(cnd) *** caught segfault *** }}) invisible(structure(msg, class = "try-error", condition = e)) mi = mi, opts = mi$options) }}) if (on_warning$silence) {address 0x110, cause 'invalid permissions' invokeRestart("muffleWarning") }, error = function(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) 9: FUN(X[[i]], ...) }}, error = function (cnd) { watcher$capture_plot_and_output()})19: parallel::mclapply(miList, runModel, mc.cores = numCores) cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, 10: classes)) tryInvokeRestart("muffleWarning")) lapply(X = S, FUN = FUN, ...) 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) { stop = invokeRestart("eval_stop"), error = NULL)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, })11: doTryCatch(return(expr), name, parentenv, handler) if (!is.null(result)) { model$fail <- FALSE})12: 30: eval(call) runModel, mc.cores = numCores))) 31: model$coefficients <- result$solution 24: runMultistart(modelInputs)eval(call) Traceback: 32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations watcher$print_value(ev$value, ev$visible, envir) 1: 25: tryCatchOne(expr, names, parentenv, handlers[[1L]])mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) Traceback: } 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) 1: Traceback: 5: Traceback: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10) 26: eval(expr, envir) mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]])}, handlers) 6: tryCatchList(expr, classes, parentenv, handlers) model$status <- result$status13: model$message <- result$message27: tryCatchList(expr, classes, parentenv, handlers) 1: *** caught segfault *** eval(expr, envir)address 0x110, cause 'invalid permissions' Traceback: 7: }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) {}) 28: withVisible(eval(expr, envir)) 1: 2: eval_f(x0, ...) 8: }) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) system.time({ 2: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)tryCatch({33: 3: eval_f(x0, ...)29: 11: 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()doWithOneRestart(return(expr), restart)doTryCatch(return(expr), name, parentenv, handler) model <- mi$model 3: 14: 34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatch(expr, error = function(e) {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: call <- conditionCall(e)in_input_dir(evaluate(code, envir = env, new_device = FALSE, 12: Traceback: if (on_warning$capture) { if (!is.null(call)) { cnd <- sanitize_call(cnd) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, mi = mi, opts = mi$options) 1: result <- NULLtryCatchOne(expr, names, parentenv, handlers[[1L]]) watcher$push(cnd) 2: mi = mi, opts = mi$options)nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatch({ if (identical(call[[1L]], quote(doTryCatch))) mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { } 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: call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) call <- sys.call(-4L)eval_f(x0, ...) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 4: dcall <- deparse(call, nlines = 1L)eval(call)doTryCatch(return(expr), name, parentenv, handler) 5: keep_message = if (is.numeric(options$message)) TRUE else options$message, }, error = function(e) { mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L tryCatchOne(expr, names, parentenv, handlers[[1L]]) else 2L 3: 2: }) 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") mi = mi, opts = mi$options)31: eval(call) 32: eval_f(x0, ...) prefix <- paste("Error in", dcall, ": ")nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 4: 6: LONG <- 75LdoTryCatch(return(expr), name, parentenv, handler) model$logLik <- as.numeric(-1 * result$objective)with_handlers({ model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 3: }, output_handler = knit_handlers(options$render, options))) if (is.na(w)) mi = mi, opts = mi$options)tryCatchList(expr, classes, parentenv, handlers) sm <- strsplit(conditionMessage(e), "\n")[[1L]] 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler)11: 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 }}) 5: for (expr in tle$exprs) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")doTryCatch(return(expr), name, parentenv, handler) tryCatchOne(expr, names, parentenv, handlers[[1L]])44: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], eng_r(options) ev <- withVisible(eval(expr, envir)) if (is.na(w)) system.time({ 9: 4: 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: 12: model <- mi$modelFUN(X[[i]], ...)doTryCatch(return(expr), name, parentenv, handler) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], tryCatchOne(expr, names, parentenv, handlers[[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]], ...) 13: 6: type = "b")system.time({tryCatchList(expr, classes, parentenv, handlers) watcher$capture_plot_and_output()tryCatchList(expr, classes, parentenv, handlers) 7: model <- mi$model45: if (w > LONG) watcher$print_value(ev$value, ev$visible, envir) result <- NULL 5: block_exec(params) tryCatch({10: }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]]) TRUE}, handlers) 33: doWithOneRestart(return(expr), restart) 34: 13: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, result <- NULL lapply(X = S, FUN = FUN, ...)46: call_block(x) 47: process_group(group) 48: tryCatchOne(expr, names, parentenv, handlers[[1L]])withOneRestart(expr, restarts[[1L]]) 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()) } mi = mi, opts = mi$options) invisible(structure(msg, class = "try-error", condition = e)) tryCatch({tryCatchList(expr, classes, parentenv, handlers) 18: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { })}) }, error = function(e) { lapply(seq_len(cores), inner.do) })35: if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations 14: 14: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) 38: withRestartList(expr, restarts) if (!is.null(result)) {tryCatch(expr, 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 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], tryCatch(expr, error = function(e) { prefix <- paste0(prefix, "\n ") 15: model$message <- result$message }}) } type = "b")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, withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 19: 9: else prefix <- "Error : "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) model$status <- result$status error = function(e) {parallel::mclapply(miList, runModel, mc.cores = numCores)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 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: if (progress && is.function(pb$interrupt)) if (w > LONG) try(lapply(X = S, FUN = FUN, ...), silent = TRUE) msg <- paste0(prefix, conditionMessage(e), "\n") 6: prefix <- paste0(prefix, "\n ")tryCatchList(expr, classes, parentenv, handlers)16: 20: .Internal(seterrmessage(msg[1L]))14: pb$interrupt() sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))withCallingHandlers(expr, warning = function(w) if (inherits(w, if (!silent && isTRUE(getOption("show.error.messages"))) { model$message <- result$message if (is_R_CMD_build() || is_R_CMD_check()) } 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()) } stop_on_error = if (is.numeric(options$error)) options$error else { error <<- format(e) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 17: classes)) tryInvokeRestart("muffleWarning")) cat(msg, file = outFile)tryCatch(expr, error = function(e) { if (options$error && options$include) 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 <- 75L16: })FUN(X[[i]], ...)16: 0L .Internal(printDeferredWarnings()) 7: } 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, sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) sm <- strsplit(conditionMessage(e), "\n")[[1L]] else 2L runModel, mc.cores = numCores)))tryCatch({18: }, output_handler = knit_handlers(options$render, options))) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")lapply(seq_len(cores), inner.do)17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: 24: 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())}) 9: FUN(X[[i]], ...) if (is.na(w)) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))parallel::mclapply(miList, runModel, mc.cores = numCores)21: 19: 44: 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: parallel::mclapply(miList, runModel, mc.cores = numCores) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) mi = mi, opts = mi$options) paste0("\nQuitting from ", loc, if (!is.null(error)) suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))eng_r(options) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 22: 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: type = "b") "brand"), scalePar = "price", numMultiStarts = 10)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, withCallingHandlers(expr, message = function(c) if (inherits(c, 10: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) if (w > LONG) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output)20: error = function(e) { classes)) tryInvokeRestart("muffleMessage")) 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) { classes)) tryInvokeRestart("muffleWarning"))withCallingHandlers(expr, warning = function(w) if (inherits(w, prefix <- paste0(prefix, "\n ") }, error = function(e) { 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() } } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) setwd(wd)lapply(X = S, FUN = FUN, ...) write_utf8(res, output %n% stdout())}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, watcher$capture_plot_and_output() paste0("\nQuitting from ", loc, if (!is.null(error)) .Internal(printDeferredWarnings()) 24: 52: if (on_warning$capture) { paste0("\n", rule(), error, "\n", rule()))26: } invisible(structure(msg, class = "try-error", condition = e))})11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) mi = mi, opts = mi$options)knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)23: runMultistart(modelInputs) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) cnd <- sanitize_call(cnd) suppressMessages(suppressWarnings(parallel::mclapply(miList, 13: 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) eval(expr, envir)tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) {25: runModel, mc.cores = numCores)))26: 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) } model$iterations <- result$iterations logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", call <- conditionCall(e)16: if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") model$status <- result$status51: if (on_message$silence) {eval(expr, envir) LONG <- 75LsendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 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]))process_file(text, output)27: eval(expr, envir) if (!silent && isTRUE(getOption("show.error.messages"))) { "brand"), scalePar = "price", numMultiStarts = 10) model$message <- result$message invokeRestart("muffleMessage") 28: 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) } watcher$push(cnd) 26: eval(expr, envir) 27: eval(expr, envir) 28: withVisible(eval(expr, envir))52: } } 29: cat(msg, file = outFile)54: withCallingHandlers(code, error = function (e) }, warning = function (cnd) withVisible(eval(expr, envir))})rlang::entrace(e), message = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) {knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) if (on_warning$silence) {{ 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)vweave_rmarkdown(...) invokeRestart("muffleWarning") watcher$push(cnd)17: 9: return() } .Internal(printDeferredWarnings())FUN(X[[i]], ...) } 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) FUN(X[[i]], ...)55: 27: } 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)10: engine$weave(file, quiet = quiet, encoding = enc) eval(expr, envir) 53: }19: }, error = function (cnd) 29: 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) rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 54: 31: 28: watcher$capture_plot_and_output()withVisible(eval(expr, envir)) 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) {withCallingHandlers(code, error = function (e) {vweave_rmarkdown(...)27: invokeRestart("muffleWarning")parallel::mclapply(miList, runModel, mc.cores = numCores)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")rlang::entrace(e), message = function (cnd) watcher$capture_plot_and_output() }{ if (w > LONG) watcher$capture_plot_and_output()}, error = function (cnd) watcher$capture_plot_and_output(){ 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)})55: eval(call) 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) prefix <- paste0(prefix, "\n ") 32: engine$weave(file, quiet = quiet, encoding = enc) } if (on_warning$silence) { invokeRestart("muffleWarning") }30: 56: doTryCatch(return(expr), name, parentenv, handler) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) }, error = function (cnd) with_handlers({20: { watcher$capture_plot_and_output()withCallingHandlers(expr, warning = function(w) if (inherits(w, } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) for (expr in tle$exprs) { 56: cnd <- sanitize_call(cnd)eval(call) 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]]) if (on_message$capture) {35: ev <- withVisible(eval(expr, envir)) 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]]) if (!silent && isTRUE(getOption("show.error.messages"))) { watcher$push(cnd)59: cat(msg, file = outFile) } watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)withRestartList(expr, restarts[-nr]) 33: doWithOneRestart(return(expr), restart) 34: withOneRestart(expr, restarts[[1L]])doTryCatch(return(expr), name, parentenv, handler) tryCatch({36: engine$weave(file, quiet = quiet, encoding = enc) .Internal(printDeferredWarnings()) setwd(startdir) if (on_message$silence) { invokeRestart("muffleMessage")eval(expr, envir) classes)) tryInvokeRestart("muffleWarning"))35: 57: doWithOneRestart(return(expr), restart) watcher$push(cnd) 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 }tryCatchOne(expr, names, parentenv, handlers[[1L]])28: 58: }, output_handler = knit_handlers(options$render, options)) output <- find_vignette_product(name, by = "weave", engine = engine) 42: in_dir(input_dir(), expr) }withVisible(eval(expr, envir)) invisible(structure(msg, class = "try-error", condition = e))}) 15: 29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) }38: 21: if (!have.makefile && vignette_is_tex(output)) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))withRestartList(expr, restarts) 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: texi2pdf(file = output, clean = FALSE, quiet = quiet)logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", if (on_message$silence) { 43: output <- find_vignette_product(name, by = "texi2pdf", 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()39: invokeRestart("muffleMessage")}, warning = function (cnd) }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return()in_input_dir(evaluate(code, envir = env, new_device = FALSE, watcher$print_value(ev$value, ev$visible, envir)withRestarts(with_handlers({{tryCatchList(expr, classes, parentenv, handlers) engine = engine) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 60: "brand"), scalePar = "price", numMultiStarts = 10) for (expr in tle$exprs) { tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 16: }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) keep_message = if (is.numeric(options$message)) TRUE else options$message, 59: TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c74ad6a3f1.rds")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)))}) TRUE ev <- withVisible(eval(expr, envir)) if (getOption("warn") >= 2 || getOption("warn") < 0) {37: } stop_on_error = if (is.numeric(options$error)) options$error else { watcher$capture_plot_and_output() return()withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])}, handlers) watcher$capture_plot_and_output()60: watcher$print_value(ev$value, ev$visible, envir)An irrecoverable exception occurred. R is aborting now ... } TRUE }tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", watcher$capture_plot_and_output() if (on_warning$capture) { TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c74ad6a3f1.rds") An irrecoverable exception occurred. R is aborting now ... 26: if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (options$error && options$include) cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") } eval(expr, envir) if (on_warning$silence) {}, error = function (cnd) {17: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) watcher$capture_plot_and_output() 0L else 2L }, output_handler = knit_handlers(options$render, options)))38: cnd <- sanitize_call(cnd)FUN(X[[i]], ...) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)})withRestartList(expr, restarts) 27: 41: 39: invokeRestart("muffleWarning")eval(expr, envir)33: 44: 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) doWithOneRestart(return(expr), restart)withRestarts(with_handlers({eng_r(options)43: 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")) 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) }, error = function (cnd) 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) { for (expr in tle$exprs) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd)21: 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, 45: 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: ev <- withVisible(eval(expr, envir)) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) 30: eval(call) 30: 48: 31: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {eval(call) 31: runMultistart(modelInputs) keep_message = if (is.numeric(options$message)) TRUE else options$message, eval(call) if (progress && is.function(pb$interrupt)) eval(call) pb$interrupt() stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L 25: block_exec(params)32: if (is_R_CMD_build() || is_R_CMD_check()) watcher$capture_plot_and_output()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) }, output_handler = knit_handlers(options$render, options)) error <<- format(e) watcher$print_value(ev$value, ev$visible, envir) 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, 33: } 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, })doWithOneRestart(return(expr), restart) 46: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 32: 28: call_block(x) 34: withOneRestart(expr, restarts[[1L]]) 35: stop_on_error = if (is.numeric(options$error)) options$error else { 47: 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 }, 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: 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) process_group(group) "brand"), scalePar = "price", numMultiStarts = 10) xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), with_handlers({ if (options$error && options$include) 48: pb$interrupt()withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) error = function(e) { if (is_R_CMD_build() || is_R_CMD_check()) 0L29: error <<- format(e) for (expr in tle$exprs) { 37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) withCallingHandlers(code, error = function (e) if (progress && is.function(pb$interrupt)) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() ev <- withVisible(eval(expr, envir)) else 2L pb$interrupt() }, output_handler = knit_handlers(options$render, options)) }), list(rlang_trace_top_env = knit_global()))38: withRestartList(expr, restarts)26: if (is_R_CMD_build() || is_R_CMD_check()) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 42: error <<- format(e) error = function(e) { }), list(rlang_trace_top_env = knit_global())), function(loc) {eval(expr, envir)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 (on_message$capture) {in_dir(input_dir(), expr) setwd(wd) write_utf8(res, output %n% stdout()) } TRUE 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) { paste0("\nQuitting from ", loc, if (!is.null(error)) if (progress && is.function(pb$interrupt)) cnd <- sanitize_call(cnd) pb$interrupt()50: watcher$push(cnd)xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { TRUE }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (is_R_CMD_build() || is_R_CMD_check()) }, handlers) error <<- format(e) 40: evaluate::evaluate(...) }27: eval(expr, envir)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 if (progress && is.function(pb$interrupt)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 51: process_file(text, output) 52: pb$interrupt() if (on_warning$silence) { else 2L33: doWithOneRestart(return(expr), restart)41: if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }) invokeRestart("muffleWarning") }), 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: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)28: process_file(text, output)34: withOneRestart(expr, restarts[[1L]]) 35: withRestartList(expr, restarts[-nr]) 36: doWithOneRestart(return(expr), restart) withVisible(eval(expr, envir)) 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())) keep_message = if (is.numeric(options$message)) TRUE else options$message, }37: 29: 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}, error = function (cnd) {withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])50: 53: }, output_handler = knit_handlers(options$render, options))) withCallingHandlers(code, error = function (e) 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) }, output_handler = knit_handlers(options$render, options))) 44: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), rlang::entrace(e), message = function (cnd) error = function(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) if (progress && is.function(pb$interrupt)) eng_r(options) 45: block_exec(params) 46: call_block(x) 38: 57: 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() 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(), ...) withRestartList(expr, restarts)54: tryCatchOne(expr, names, parentenv, handlers[[1L]]) watcher$capture_plot_and_output() 47: cnd <- sanitize_call(cnd) watcher$push(cnd) if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)58: process_group(group)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), })vweave_rmarkdown(...) output_dir = getwd(), ...) switch(on_error, continue = invokeRestart("eval_continue"), tryCatchList(expr, classes, parentenv, handlers) 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { 55: if (progress && is.function(pb$interrupt)) stop = invokeRestart("eval_stop"), error = NULL) watcher$capture_plot_and_output() 59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc)48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), pb$interrupt()engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) 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() output <- find_vignette_product(name, by = "weave", engine = engine) error = function(e) { if (progress && is.function(pb$interrupt)) 39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) pb$interrupt()54: vweave_rmarkdown(...) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) } if (on_message$capture) {}) if (is_R_CMD_build() || is_R_CMD_check()) 30: if (is_R_CMD_build() || is_R_CMD_check()) 56: }, error = function(e) {eval(call) watcher$push(cnd) watcher$capture_plot_and_output()doTryCatch(return(expr), name, parentenv, handler) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 40: evaluate::evaluate(...) 41: error <<- format(e)57: 55: OK <<- FALSE }evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, error <<- format(e)engine$weave(file, quiet = quiet, encoding = enc) 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) { keep_message = if (is.numeric(options$message)) TRUE else options$message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) 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/RtmpIGWWhl/file96c74ad6a3f1.rds") An irrecoverable exception occurred. R is aborting now ... 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)}) stop_on_error = if (is.numeric(options$error)) options$error else { }), list(rlang_trace_top_env = knit_global())), function(loc) {56: 30: 31: eval(call)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: }) if (options$error && options$include) setwd(wd) doTryCatch(return(expr), name, parentenv, handler)withOneRestart(expr, restarts[[1L]]) write_utf8(res, output %n% stdout()) 0L 58: 31: 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)))}) paste0("\nQuitting from ", loc, if (!is.null(error)) 49: 35: eval(call)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) 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()57: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), paste0("\n", rule(), error, "\n", rule()))60: 0LtryCatchOne(expr, names, parentenv, handlers[[1L]]) 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) error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() watcher$print_value(ev$value, ev$visible, envir)tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", else 2L}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) } }, output_handler = knit_handlers(options$render, options)) 51: if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)42: TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c74ad6a3f1.rds") TRUEin_dir(input_dir(), expr)}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 58: 46: call_block(x) process_file(text, output) }), list(rlang_trace_top_env = knit_global()))43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, 47: process_group(group) 48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 52: 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), tryCatchList(expr, classes, parentenv, handlers)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(), ...) knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 40: keep_message = if (is.numeric(options$message)) TRUE else options$message, 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, stop_on_error = if (is.numeric(options$error)) options$error else {59: error = function(e) { if (options$error && options$include) 53: 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) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, An irrecoverable exception occurred. R is aborting now ... 54: write_utf8(res, output %n% stdout())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", keep_message = if (is.numeric(options$message)) TRUE else options$message, rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) paste0("\nQuitting from ", loc, if (!is.null(error)) file, conditionMessage(e)))}) 0Lvweave_rmarkdown(...) else 2L54: vweave_rmarkdown(...)60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 55: }, output_handler = knit_handlers(options$render, options))) 44: eng_r(options) 45: block_exec(params) TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpIGWWhl/file96c74ad6a3f1.rds") 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/RtmpIGWWhl/file96c74ad6a3f1.rds") An irrecoverable exception occurred. R is aborting now ... engine$weave(file, quiet = quiet, encoding = enc) 56: doTryCatch(return(expr), name, parentenv, handler) paste0("\n", rule(), error, "\n", rule()))An irrecoverable exception occurred. R is aborting now ... }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 58: tryCatchList(expr, classes, parentenv, handlers) 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()) stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L error <<- format(e)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: }, output_handler = knit_handlers(options$render, options))) }) 44: eng_r(options) 45: block_exec(params) 46: call_block(x) 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: 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) }) 59: 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/RtmpIGWWhl/file96c74ad6a3f1.rds") An irrecoverable exception occurred. R is aborting now ... 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", 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/RtmpIGWWhl/file96c74ad6a3f1.rds") An irrecoverable exception occurred. R is aborting now ... 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/RtmpIGWWhl/file96c74ad6a3f1.rds") 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())) 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/RtmpIGWWhl/file96c74ad6a3f1.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-oldrel-macos-arm64