Last updated on 2025-12-29 12:50:55 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.3 | 5.34 | 148.13 | 153.47 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.3 | 3.58 | 115.41 | 118.99 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.3 | 9.00 | 238.06 | 247.06 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.3 | 8.00 | 269.95 | 277.95 | OK | |
| r-devel-windows-x86_64 | 1.1.3 | 9.00 | 211.00 | 220.00 | OK | |
| r-patched-linux-x86_64 | 1.1.3 | 6.08 | 141.79 | 147.87 | OK | |
| r-release-linux-x86_64 | 1.1.3 | 4.71 | 141.49 | 146.20 | OK | |
| r-release-macos-arm64 | 1.1.3 | 1.00 | 43.00 | 44.00 | ERROR | |
| r-release-macos-x86_64 | 1.1.3 | 4.00 | 179.00 | 183.00 | OK | |
| r-release-windows-x86_64 | 1.1.3 | 9.00 | 201.00 | 210.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.3 | 1.00 | 51.00 | 52.00 | OK | |
| r-oldrel-macos-x86_64 | 1.1.3 | 4.00 | 205.00 | 209.00 | OK | |
| r-oldrel-windows-x86_64 | 1.1.3 | 11.00 | 262.00 | 273.00 | OK |
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'
*** 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({
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 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) { 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, ...)
}) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution11: 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)))
Traceback:
call <- sys.call(-4L) model$logLik <- as.numeric(-1 * result$objective) dcall <- deparse(call, nlines = 1L) 1:
Traceback:
model$iterations <- result$iterations 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) model$status <- result$status
prefix <- paste("Error in", dcall, ": ") model$message <- result$message LONG <- 75Lmi$logitFuncs$getMnlV(pars, d$X, d$scalePar) sm <- strsplit(conditionMessage(e), "\n")[[1L]] 2:
eval_f(x0, ...)
3: }nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 2: eval_f(x0, ...)
})
9: FUN(X[[i]], ...)
3:
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")10: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 4: lapply(X = S, FUN = FUN, ...) if (is.na(w)) mi = mi, opts = mi$options) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
if (w > LONG) 11:
doTryCatch(return(expr), name, parentenv, handler) prefix <- paste0(prefix, "\n ")
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
4: }14: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
tryCatch(expr, error = function(e) { 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") call <- conditionCall(e)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (!is.null(call)) { mi = mi, opts = mi$options)}, error = function(e) {}) .Internal(seterrmessage(msg[1L]))}, error = function(e) { if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)})
8: system.time({ 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 <- mi$model
result <- NULL if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) tryCatch({ 8: .Internal(printDeferredWarnings()) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, system.time({ mi = mi, opts = mi$options) model <- mi$model }, error = function(e) { result <- NULL }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution tryCatch({ } prefix <- paste0(prefix, "\n ") result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, invisible(structure(msg, class = "try-error", condition = e))}) mi = mi, opts = mi$options) } }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution else prefix <- "Error : "
15: msg <- paste0(prefix, conditionMessage(e), "\n")try(lapply(X = S, FUN = FUN, ...), silent = TRUE) .Internal(seterrmessage(msg[1L])) model$logLik <- as.numeric(-1 * result$objective) if (!silent && isTRUE(getOption("show.error.messages"))) { model$iterations <- result$iterations model$status <- result$status model$logLik <- as.numeric(-1 * result$objective) cat(msg, file = outFile) .Internal(printDeferredWarnings()) model$iterations <- result$iterations } model$message <- result$message
model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: invisible(structure(msg, class = "try-error", condition = e)) }16: })})
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))lapply(X = S, FUN = FUN, ...)
17: 9: 11: FUN(X[[i]], ...)doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)15: FUN(X[[i]], ...)
14: tryCatch(expr, error = function(e) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
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) call <- conditionCall(e)18: 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
lapply(seq_len(cores), inner.do)
14: if (!is.null(call)) {
19: tryCatch(expr, error = function(e) {parallel::mclapply(miList, runModel, mc.cores = numCores)
if (identical(call[[1L]], quote(doTryCatch))) 18: lapply(seq_len(cores), inner.do)
call <- conditionCall(e)20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
if (!is.null(call)) {19: call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) if (identical(call[[1L]], quote(doTryCatch))) 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)) 22: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], call <- sys.call(-4L)parallel::mclapply(miList, runModel, mc.cores = numCores)withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
type = "b")
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 ...
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L classes)) tryInvokeRestart("muffleWarning")) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
if (w > LONG) prefix <- paste0(prefix, "\n ") }25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) 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) if (w > LONG)
16: prefix <- paste0(prefix, "\n ")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
An irrecoverable exception occurred. R is aborting now ...
}
else prefix <- "Error : "17: msg <- paste0(prefix, conditionMessage(e), "\n")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: .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]], ...)
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: 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 ...
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-release-macos-arm64
Version: 1.1.3
Check: re-building of vignette outputs
Result: ERROR
Error(s) in re-building vignettes:
--- re-building ‘basic_usage.Rmd’ using rmarkdown
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** 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",
*** caught segfault ***
address 0x110, cause 'invalid permissions'
"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) {
Traceback:
Traceback:
1: 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)
Traceback:
return() } watcher$capture_plot_and_output() if (on_warning$capture) { 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)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 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({ 7:
for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)
}tryCatch({ 4: doTryCatch(return(expr), name, parentenv, handler)
5: 2: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatchOne(expr, names, parentenv, handlers[[1L]]) mi = mi, opts = mi$options)}, error = function(e) {})
8: TRUEeval_f(x0, ...)}, handlers)
33: doWithOneRestart(return(expr), restart)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
34: withOneRestart(expr, restarts[[1L]])
4: system.time({
doTryCatch(return(expr), name, parentenv, handler) 6: tryCatchList(expr, classes, parentenv, handlers)
35: 7:
tryCatch({withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
5: model <- mi$model result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]])
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
6: tryCatchList(expr, classes, parentenv, handlers)
}) 7: result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) {
8: mi = mi, opts = mi$options)system.time({ model <- mi$model result <- NULL }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) }tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
}, error = function(e) { 8: }) TRUE
Traceback:
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (!is.null(result)) {system.time({ model$fail <- FALSE model$status <- result$status model$message <- result$message }})
1: model <- mi$model 9: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2:
model$coefficients <- result$solutioneval_f(x0, ...) model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$statusFUN(X[[i]], ...)
model$message <- result$message result <- NULL }})
tryCatch({
*** caught segfault ***
address 0x110, cause 'invalid permissions'
3:
9: FUN(X[[i]], ...)
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 10: 10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)40: evaluate::evaluate(...)
41:
mi = mi, opts = mi$options)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,
12:
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
13: tryCatchList(expr, classes, parentenv, handlers)11: 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$iterations14: tryCatch(expr, error = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include)
model$status <- result$status 0LdoTryCatch(return(expr), name, parentenv, handler) 6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
call <- conditionCall(e) if (!is.null(call)) { mi = mi, opts = mi$options) model$message <- result$message12: if (identical(call[[1L]], quote(doTryCatch))) else 2L call <- sys.call(-4L) } }, output_handler = knit_handlers(options$render, options))}, error = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]])}) dcall <- deparse(call, nlines = 1L)
42: in_dir(input_dir(), expr)
prefix <- paste("Error in", dcall, ": ")
8: system.time({ model <- mi$model43: 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, result <- NULL13: LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
*** caught segfault ***
mi = mi, opts = mi$options) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], }, error = function(e) {tryCatchList(expr, classes, parentenv, handlers) type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ")
}) } }) stop_on_error = if (is.numeric(options$error)) options$error else {14: 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$statustryCatch(expr, error = function(e) { model$message <- result$message } call <- conditionCall(e)
address 0x110, cause 'invalid permissions'
if (!is.null(call)) {
Traceback:
}) 9: if (identical(call[[1L]], quote(doTryCatch))) else prefix <- "Error : "FUN(X[[i]], ...) 1:
if (options$error && options$include) mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")
0L 2: msg <- paste0(prefix, conditionMessage(e), "\n") 9: LONG <- 75L10: .Internal(seterrmessage(msg[1L]))lapply(X = S, FUN = FUN, ...) else 2Leval_f(x0, ...) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)
.Internal(printDeferredWarnings()) } 3: invisible(structure(msg, class = "try-error", condition = e)) }, output_handler = knit_handlers(options$render, options)))nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
mi = mi, opts = mi$options) sm <- strsplit(conditionMessage(e), "\n")[[1L]]FUN(X[[i]], ...)})
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 4: 44: doTryCatch(return(expr), name, parentenv, handler)eng_r(options)
10: 15:
if (is.na(w))
11: 5: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], try(lapply(X = S, FUN = FUN, ...), silent = TRUE)doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]])
12: lapply(X = S, FUN = FUN, ...)
6: tryCatchList(expr, classes, parentenv, handlers)
45:
7: type = "b")tryCatchOne(expr, names, parentenv, handlers[[1L]])11: if (w > LONG) doTryCatch(return(expr), name, parentenv, handler) prefix <- paste0(prefix, "\n ")
tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {
16: })
8: }
13: tryCatchList(expr, classes, parentenv, handlers)
14: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) {
block_exec(params)system.time({
tryCatch(expr, error = function(e) {46: model <- mi$modelcall_block(x) result <- NULL
cat(msg, file = outFile)17: 47:
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
12: 2: .Internal(printDeferredWarnings())FUN(X[[i]], ...)eval_f(x0, ...)
call <- conditionCall(e)tryCatchOne(expr, names, parentenv, handlers[[1L]]) } 3:
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, invisible(structure(msg, class = "try-error", condition = e))
18: lapply(seq_len(cores), inner.do)
})13: mi = mi, opts = mi$options)process_group(group)19:
tryCatchList(expr, classes, parentenv, handlers) tryCatch({parallel::mclapply(miList, runModel, mc.cores = numCores)
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { })
20:
14: withCallingHandlers(expr, warning = function(w) if (inherits(w, 15: tryCatch(expr, error = function(e) { call <- conditionCall(e)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (!is.null(call)) { classes)) tryInvokeRestart("muffleWarning")) 4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution48:
*** caught segfault ***
model$logLik <- as.numeric(-1 * result$objective)
address 0x110, cause 'invalid permissions'
21: model$iterations <- result$iterations model$status <- result$status model$message <- result$message } if (!is.null(call)) {withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 7: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))tryCatch({ error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)
if (identical(call[[1L]], quote(doTryCatch))) }) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)})
16: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (identical(call[[1L]], quote(doTryCatch))) 9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler) mi = mi, opts = mi$options)
49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() prefix <- paste("Error in", dcall, ": ") if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
*** caught segfault ***
address 0x110, cause 'invalid permissions'
call <- sys.call(-4L)}, error = function(e) {
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
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], }), list(rlang_trace_top_env = knit_global())) type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") LONG <- 75L22: withCallingHandlers(expr, message = function(c) if (inherits(c, })
8: system.time({ model <- mi$model
result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, sm <- strsplit(conditionMessage(e), "\n")[[1L]]19: parallel::mclapply(miList, runModel, mc.cores = numCores)
classes)) tryInvokeRestart("muffleMessage")) mi = mi, opts = mi$options)
23: 20: }withCallingHandlers(expr, warning = function(w) if (inherits(w, suppressMessages(suppressWarnings(parallel::mclapply(miList, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
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: else prefix <- "Error : "50:
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), tryCatchList(expr, classes, parentenv, handlers)
runMultistart(modelInputs)
25: if (is.na(w))
error = function(e) {24: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat",
Traceback:
1: msg <- paste0(prefix, conditionMessage(e), "\n") }, error = function(e) { "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
14: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)tryCatch(expr, error = function(e) { }) .Internal(seterrmessage(msg[1L]))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 27: 2: if (!silent && isTRUE(getOption("show.error.messages"))) {runMultistart(modelInputs) call <- conditionCall(e)eval(expr, envir) if (!is.null(result)) {
cat(msg, file = outFile) if (!is.null(call)) { type = "b")
28: 25: withVisible(eval(expr, envir)) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
if (w > LONG) model$fail <- FALSE if (progress && is.function(pb$interrupt)) pb$interrupt() prefix <- paste0(prefix, "\n ") }
Traceback:
eval_f(x0, ...) model$coefficients <- result$solution 1:
29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) if (is_R_CMD_build() || is_R_CMD_check()) model$logLik <- as.numeric(-1 * result$objective) 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()) }
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
invisible(structure(msg, class = "try-error", condition = e)) model$iterations <- result$iterations if (identical(call[[1L]], quote(doTryCatch))) }) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: {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))
model$status <- result$status15: 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: call <- sys.call(-4L)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) model$message <- result$messagetryCatch({ watcher$capture_plot_and_output()suppressMessages(suppressWarnings(parallel::mclapply(miList, }})
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: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 15:
dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L if (on_message$capture) { 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)
*** caught segfault ***
29: address 0x110, cause 'invalid permissions'
2: withCallingHandlers(code, error = function (e) try(lapply(X = S, FUN = FUN, ...), silent = TRUE) watcher$push(cnd)rlang::entrace(e), message = function (cnd) runModel, mc.cores = numCores))){tryCatch(expr, error = function(e) {
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: call <- conditionCall(e)
.Internal(printDeferredWarnings()) error <<- format(e)eval_f(x0, ...) }), 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)) watcher$capture_plot_and_output()lapply(seq_len(cores), inner.do) if (!is.null(call)) {
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
} paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
if (on_message$capture) { if (on_message$silence) { } invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() 5: 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 ") } invisible(structure(msg, class = "try-error", condition = e))tryCatchOne(expr, names, parentenv, handlers[[1L]]) mi = mi, opts = mi$options)
6: tryCatchList(expr, classes, parentenv, handlers)
} else prefix <- "Error : "}, error = function(e) {}) watcher$push(cnd)51: process_file(text, output)
52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
msg <- paste0(prefix, conditionMessage(e), "\n") } if (on_message$silence) { invokeRestart("muffleMessage")24:
Traceback:
19: }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() 1: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
runMultistart(modelInputs)
.Internal(seterrmessage(msg[1L])) watcher$capture_plot_and_output()21: })mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
if (!silent && isTRUE(getOption("show.error.messages"))) { if (on_warning$capture) { cat(msg, file = outFile) 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 <- FALSE25: 7:
53: .Internal(printDeferredWarnings())suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 2: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", model$coefficients <- result$solution15: } }
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) rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), eval_f(x0, ...)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) "brand"), scalePar = "price", numMultiStarts = 10)
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() output_dir = getwd(), ...){ watcher$capture_plot_and_output() cnd <- sanitize_call(cnd)
54: vweave_rmarkdown(...)22: model$logLik <- as.numeric(-1 * result$objective)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: if (on_message$capture) { watcher$push(cnd) } model$iterations <- result$iterations cnd <- sanitize_call(cnd)tryCatchList(expr, classes, parentenv, handlers)withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, model$status <- result$status
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 : " model$message <- result$message }})
9: FUN(X[[i]], ...) msg <- paste0(prefix, conditionMessage(e), "\n")26: if (on_message$silence) {
55: engine$weave(file, quiet = quiet, encoding = enc)
56: doTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffleMessage")
eval(expr, envir)
10:
runModel, mc.cores = numCores))) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), 27: 3:
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
.Internal(seterrmessage(msg[1L])) } if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) invisible(structure(msg, class = "try-error", condition = e))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() stop = invokeRestart("eval_stop"), error = NULL)})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...) watcher$push(cnd) } if (on_warning$silence) {24: if (on_message$capture) { mi = mi, opts = mi$options)lapply(X = S, FUN = FUN, ...) .Internal(printDeferredWarnings())
runMultistart(modelInputs) watcher$push(cnd)
invokeRestart("muffleWarning") }})18: }, warning = function (cnd)
4: }57: {
tryCatchOne(expr, names, parentenv, handlers[[1L]])doTryCatch(return(expr), name, parentenv, handler) } invisible(structure(msg, class = "try-error", condition = e)) if (getOption("warn") >= 2 || getOption("warn") < 0) { if (on_message$silence) {lapply(seq_len(cores), inner.do)
11: invokeRestart("muffleMessage")58: })
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: }25:
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"))
}, error = function (cnd) }, 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){23: 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)
tryCatchList(expr, classes, parentenv, handlers)30: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs) }doTryCatch(return(expr), name, parentenv, handler)})
59: 30: return() } 5: 15: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 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)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)eval(call)
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]])
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)
35: "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)})tryCatchOne(expr, names, parentenv, handlers[[1L]])12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
25: eval(call)
20: 13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch({
logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 31: tryCatch(expr, error = function(e) { engine$weave(file, quiet = quiet, encoding = enc)31: eval(call)
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()eval(call)
withCallingHandlers(expr, warning = function(w) if (inherits(w, call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L "brand"), scalePar = "price", numMultiStarts = 10)27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: 6: classes)) tryInvokeRestart("muffleWarning")) watcher$print_value(ev$value, ev$visible, envir)tryCatchList(expr, classes, parentenv, handlers)30:
withRestartList(expr, restarts[-nr])
26: eval(expr, envir)
27: eval(expr, envir)
28: 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)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")
21: 29: withCallingHandlers(code, error = function (e) 36: eval(call) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) { if (w > LONG)
32: with_handlers({ prefix <- paste0(prefix, "\n ")suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) {rlang::entrace(e), message = function (cnd) }doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts) texi2pdf(file = output, clean = FALSE, quiet = quiet){
31: eval(call)
32: with_handlers({ for (expr in tle$exprs) {}) }
output <- find_vignette_product(name, by = "texi2pdf", withCallingHandlers(code, error = function (e) for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) TRUE39: ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()
engine = engine) 8: watcher$print_value(ev$value, ev$visible, envir) }system.time({ else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") model <- mi$model }rlang::entrace(e), message = function (cnd) 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, TRUE}, handlers) watcher$capture_plot_and_output() stop_on_error = if (is.numeric(options$error)) options$error else { if (on_message$capture) {{ result <- NULL .Internal(seterrmessage(msg[1L])) watcher$push(cnd) 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)}, handlers)
} tryCatch({22: }, 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/RtmpiidpGf/file27042959f05d.rds")
An irrecoverable exception occurred. R is aborting now ...
withCallingHandlers(expr, message = function(c) if (inherits(c, if (on_message$silence) {
33:
watcher$capture_plot_and_output() watcher$capture_plot_and_output() 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)
33: doWithOneRestart(return(expr), restart)
classes)) tryInvokeRestart("muffleMessage"))48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() watcher$print_value(ev$value, ev$visible, envir)34:
withOneRestart(expr, restarts[[1L]]) if (on_message$capture) {doWithOneRestart(return(expr), restart)23: } TRUE}, handlers)
suppressMessages(suppressWarnings(parallel::mclapply(miList,
35: if (is_R_CMD_build() || is_R_CMD_check()) invokeRestart("muffleMessage") 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 watcher$push(cnd)34: }withRestartList(expr, restarts[-nr]) runModel, mc.cores = numCores))) }withOneRestart(expr, restarts[[1L]])}, 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)
model$coefficients <- result$solution error <<- format(e)19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) watcher$push(cnd) model$logLik <- as.numeric(-1 * result$objective)33: 35: 24: withRestartList(expr, restarts[-nr]) if (on_message$silence) {
switch(on_error, continue = invokeRestart("eval_continue"), })
model$iterations <- result$iterations36:
invokeRestart("muffleMessage") stop = invokeRestart("eval_stop"), error = NULL)runMultistart(modelInputs)doWithOneRestart(return(expr), restart)36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
})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: doWithOneRestart(return(expr), restart)
37: }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output()21:
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)30: model$status <- result$status34: 39: eval(call)25: model$message <- result$messagelogitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: withRestarts(with_handlers({withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])process_file(text, output)withOneRestart(expr, restarts[[1L]])
eval(expr, envir)
}})
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) {52: 31: 35: call <- conditionCall(e)28: 31: withRestartList(expr, restarts[-nr])suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))38: eval(call)
withVisible(eval(expr, envir)) if (!is.null(call)) { for (expr in tle$exprs) {
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))withRestartList(expr, restarts) 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: 32:
if (identical(call[[1L]], quote(doTryCatch))) knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
with_handlers({
eval(call)36: 39: for (expr in tle$exprs) { call <- sys.call(-4L)
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")doWithOneRestart(return(expr), restart)evaluate::evaluate(...) dcall <- deparse(call, nlines = 1L)withRestarts(with_handlers({ 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) ev <- withVisible(eval(expr, envir))
37: }}, error = function (cnd) 32:
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
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 for (expr in tle$exprs) {{53: watcher$print_value(ev$value, ev$visible, envir) watcher$capture_plot_and_output()}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) classes)) tryInvokeRestart("muffleWarning")) }
cnd <- sanitize_call(cnd)24:
41: 40: ev <- withVisible(eval(expr, envir))runMultistart(modelInputs)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 21: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,
evaluate::evaluate(...)
41: output_dir = getwd(), ...) watcher$push(cnd)
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)
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)25: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, 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: 59: 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) { watcher$capture_plot_and_output()evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)
34: TRUEtryCatch({}, handlers)
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
36: if (progress && is.function(pb$interrupt)) doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
39: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", withOneRestart(expr, restarts[[1L]]) 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))
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)withRestarts(with_handlers({ pb$interrupt() "brand"), scalePar = "price", numMultiStarts = 10)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)
classes)) tryInvokeRestart("muffleMessage"))35: if (is_R_CMD_build() || is_R_CMD_check()) } error <<- format(e)
46: } for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() switch(on_error, continue = invokeRestart("eval_continue"), }, error = function(e) { TRUE23: stop = invokeRestart("eval_stop"), error = NULL)withRestartList(expr, restarts[-nr])
call_block(x) }), 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(), ...)
26: OK <<- FALSE54:
})
30: eval(call)
31: eval(call)
36: doWithOneRestart(return(expr), restart)
watcher$print_value(ev$value, ev$visible, envir)vweave_rmarkdown(...)
message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", suppressMessages(suppressWarnings(parallel::mclapply(miList, 32: with_handlers({47: file, conditionMessage(e)))})
60: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", }37: runModel, mc.cores = numCores)))withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) TRUE55: error = function(e) {24: 38: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file27042959f05d.rds")}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)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)
for (expr in tle$exprs) {
eval(expr, envir) if (progress && is.function(pb$interrupt)) } ev <- withVisible(eval(expr, envir))
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)
27: 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, engine$weave(file, quiet = quiet, encoding = enc)An irrecoverable exception occurred. R is aborting now ...
40: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) evaluate::evaluate(...) "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()
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, 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()))
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 {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(), ...)
if (on_message$capture) { if (options$error && options$include) 56: stop_on_error = if (is.numeric(options$error)) options$error else {{54: watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) watcher$capture_plot_and_output() if (options$error && options$include) 0L watcher$push(cnd)doTryCatch(return(expr), name, parentenv, handler) } if (on_message$capture) { 0L watcher$push(cnd) }vweave_rmarkdown(...) else 2L keep_message = if (is.numeric(options$message)) TRUE else options$message, else 2L } TRUE
stop_on_error = if (is.numeric(options$error)) options$error else { }, output_handler = knit_handlers(options$render, options))) if (on_message$silence) {}, handlers) 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), invokeRestart("muffleMessage") }, output_handler = knit_handlers(options$render, options))
}}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) {57: if (on_message$silence) {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) return()tryCatchOne(expr, names, parentenv, handlers[[1L]]) } watcher$capture_plot_and_output() invokeRestart("muffleMessage")44:
eng_r(options)
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", if (on_warning$capture) { error = function(e) {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)
42: }, 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) { if (progress && is.function(pb$interrupt)) 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) pb$interrupt() output <- find_vignette_product(name, by = "weave", engine = engine) 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() invokeRestart("muffleWarning") cnd <- sanitize_call(cnd)40: file, conditionMessage(e))) if (is_R_CMD_build() || is_R_CMD_check()) if (!have.makefile && vignette_is_tex(output)) { }
}, error = function (cnd)
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)))45: }) watcher$push(cnd)48:
block_exec(params)
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/RtmpiidpGf/file27042959f05d.rds")
An irrecoverable exception occurred. R is aborting now ...
withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 44: error = function(e) { 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)))}) 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())
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/RtmpiidpGf/file27042959f05d.rds")
An irrecoverable exception occurred. R is aborting now ...
eng_r(options)
45: block_exec(params) error <<- format(e){ watcher$capture_plot_and_output() }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd)
error <<- format(e) write_utf8(res, output %n% stdout()) }), list(rlang_trace_top_env = knit_global())) cnd <- sanitize_call(cnd) paste0("\nQuitting from ", loc, if (!is.null(error)) }46:
call_block(x)
47: 46: if (on_warning$silence) {process_group(group) paste0("\n", rule(), error, "\n", rule()))call_block(x)
}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
51: process_file(text, output) invokeRestart("muffleWarning") }}, error = function (cnd) 50: watcher$push(cnd){
48: 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())withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))
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) })}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) error = function(e) {
52: if (progress && is.function(pb$interrupt)) knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
51: pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) })
49: switch(on_error, continue = invokeRestart("eval_continue"), 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), watcher$capture_plot_and_output() stop = invokeRestart("eval_stop"), error = NULL) output_dir = getwd(), ...)process_file(text, output)})
54: 49:
52: vweave_rmarkdown(...)with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
55: engine$weave(file, quiet = quiet, encoding = enc)
56: doTryCatch(return(expr), name, parentenv, handler)
with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) 53: cnd <- sanitize_call(cnd) pb$interrupt() watcher$push(cnd)57: 30: switch(on_error, continue = invokeRestart("eval_continue"), tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: tryCatchList(expr, classes, parentenv, handlers)
59: eval(call) if (progress && is.function(pb$interrupt)) pb$interrupt() stop = invokeRestart("eval_stop"), error = NULL)
31: eval(call)
tryCatch({32: if (is_R_CMD_build() || is_R_CMD_check()) engine$weave(file, quiet = quiet, encoding = enc)})
30: error <<- format(e)eval(call) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) {
31: eval(call)
32: if (is_R_CMD_build() || is_R_CMD_check()) rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), with_handlers({with_handlers({ output_dir = getwd(), ...) texi2pdf(file = output, clean = FALSE, quiet = quiet)
54: output <- find_vignette_product(name, by = "texi2pdf", for (expr in tle$exprs) { error <<- format(e) }), list(rlang_trace_top_env = knit_global())) engine = engine) }}, error = function(e) {vweave_rmarkdown(...) }), list(rlang_trace_top_env = knit_global())) OK <<- FALSE
message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
60: for (expr in tle$exprs) {50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), ev <- withVisible(eval(expr, envir)) error = function(e) { ev <- withVisible(eval(expr, envir))
watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 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) { }
watcher$capture_plot_and_output() TRUE TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file27042959f05d.rds")55: setwd(wd) watcher$print_value(ev$value, ev$visible, envir)engine$weave(file, quiet = quiet, encoding = enc) } TRUE
write_utf8(res, output %n% stdout())}, handlers)}, handlers)
33: 56:
33: doWithOneRestart(return(expr), restart)
34: doWithOneRestart(return(expr), restart) paste0("\nQuitting from ", loc, if (!is.null(error))
doTryCatch(return(expr), name, parentenv, handler)An irrecoverable exception occurred. R is aborting now ...
50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)withOneRestart(expr, restarts[[1L]])
paste0("\n", rule(), error, "\n", rule()))
}), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout())57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: tryCatchList(expr, classes, parentenv, handlers)
59: tryCatch({ paste0("\nQuitting from ", loc, if (!is.null(error))
35: paste0("\n", rule(), error, "\n", rule())) engine$weave(file, quiet = quiet, encoding = enc)34: }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
51: withOneRestart(expr, restarts[[1L]]) setwd(startdir)
}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) output <- find_vignette_product(name, by = "weave", engine = engine)withRestartList(expr, restarts[-nr])
36: if (!have.makefile && vignette_is_tex(output)) {doWithOneRestart(return(expr), restart)35: texi2pdf(file = output, clean = FALSE, quiet = quiet)withRestartList(expr, restarts[-nr]) output <- find_vignette_product(name, by = "texi2pdf", process_file(text, output)
52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
53: engine = engine)51:
37:
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
process_file(text, output)withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 38: }}, error = function(e) {
OK <<- FALSE
38: 52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) output_dir = getwd(), ...)
withRestartList(expr, restarts)54:
withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) { message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", vweave_rmarkdown(...)54: file, conditionMessage(e))) ev <- withVisible(eval(expr, envir))
watcher$capture_plot_and_output()
39: }) watcher$print_value(ev$value, ev$visible, envir)55: } TRUE
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/RtmpiidpGf/file27042959f05d.rds")}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: withRestarts(with_handlers({vweave_rmarkdown(...)
55: engine$weave(file, quiet = quiet, encoding = enc)
for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) }An irrecoverable exception occurred. R is aborting now ...
TRUEevaluate::evaluate(...)engine$weave(file, quiet = quiet, encoding = enc)}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
56: doTryCatch(return(expr), name, parentenv, handler)
57:
tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: tryCatchList(expr, classes, parentenv, handlers)56: doTryCatch(return(expr), name, parentenv, handler)
57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
40: 58: 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))tryCatchList(expr, classes, parentenv, handlers)
59: tryCatch({59: tryCatch({
evaluate::evaluate(...) engine$weave(file, quiet = quiet, encoding = enc) engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)42: output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) {in_dir(input_dir(), expr) texi2pdf(file = output, clean = FALSE, quiet = quiet)
output <- find_vignette_product(name, by = "texi2pdf",
engine = engine)43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, 41: keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) 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 }evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }, error = function(e) { 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: OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) }, output_handler = knit_handlers(options$render, options)))
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/RtmpiidpGf/file27042959f05d.rds")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 {44: if (!have.makefile && vignette_is_tex(output)) {
if (options$error && options$include) 0LAn irrecoverable exception occurred. R is aborting now ...
texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }eng_r(options)
45: block_exec(params)
46: call_block(x)
47: }, error = function(e) { else 2L }, output_handler = knit_handlers(options$render, options)))
44: OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))process_group(group)
48: eng_r(options)})
60: tools:::.buildOneVignette("basic_usage.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
45: block_exec(params)
error = function(e) { if (progress && is.function(pb$interrupt)) 46: call_block(x)
47: process_group(group) TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file27042959f05d.rds")
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) })
49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 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()An irrecoverable exception occurred. R is aborting now ...
if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global()))
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(), ...)
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) {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) 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)
setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) {53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
54: vweave_rmarkdown(...) texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) {
55: OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", engine$weave(file, quiet = quiet, encoding = enc)
56: doTryCatch(return(expr), name, parentenv, handler)
57: tryCatchOne(expr, names, parentenv, handlers[[1L]]) file, conditionMessage(e)))})
58: tryCatchList(expr, classes, parentenv, handlers)
59: tryCatch({
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/RtmpiidpGf/file27042959f05d.rds") engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)
An irrecoverable exception occurred. R is aborting now ...
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/RtmpiidpGf/file27042959f05d.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) 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.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file270473410613.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
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 2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])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 ")
6: tryCatchList(expr, classes, parentenv, handlers)
7: } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) {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 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)) 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]], ...)
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: 10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd)
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))) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : "{ if (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") 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)
}}, 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) {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: 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: 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)
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) }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) TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: evaluate::evaluate(...)
41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, } if (on_warning$silence) { invokeRestart("muffleWarning") }}, 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))
42: in_dir(input_dir(), expr)
43: { 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)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:
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)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)) } 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() pb$interrupt() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: evaluate::evaluate(...)
41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr) 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()
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)))
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)) 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)) 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: 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()))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 (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(), ...)57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: tryCatchList(expr, classes, parentenv, handlers)
59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc)
54: vweave_rmarkdown(...)
55: engine$weave(file, quiet = quiet, encoding = enc)
56: doTryCatch(return(expr), name, parentenv, handler)
57: 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", 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) 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/RtmpiidpGf/file270473410613.rds")
An irrecoverable exception occurred. R is aborting now ...
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/RtmpiidpGf/file270473410613.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
Traceback:
1: result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
Traceback:
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: 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]])eval_f(x0, ...)
3:
mi = mi, opts = mi$options) }, error = function(e) {nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 6: tryCatchList(expr, classes, parentenv, handlers) mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: }) 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$messagetryCatchList(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) {})
9: FUN(X[[i]], ...)
10:
7: tryCatch({})
lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8: system.time({ model <- mi$model result <- NULL result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatch({
Traceback:
mi = mi, opts = mi$options)13: }, error = function(e) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
*** caught segfault ***
address 0x110, cause 'invalid permissions'
})
8: system.time({ model <- mi$model
Traceback:
mi = mi, opts = mi$options) result <- NULL tryCatch({ 1: tryCatchList(expr, classes, parentenv, handlers)
*** caught segfault ***
}, error = function(e) { 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) { }) 1: 14: }) if (!is.null(result)) {mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) model$fail <- FALSE if (!is.null(result)) {
2: eval_f(x0, ...)
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
model$fail <- FALSE 3: 2: model$coefficients <- result$solutionnloptr::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)eval_f(x0, ...)tryCatch(expr, error = function(e) { model$coefficients <- result$solution
model$logLik <- as.numeric(-1 * result$objective) call <- conditionCall(e) 3: model$iterations <- result$iterationsnloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) model$status <- result$status if (!is.null(call)) {
model$message <- result$message model$logLik <- as.numeric(-1 * result$objective) } model$iterations <- result$iterations
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) model$status <- result$status 7: model$message <- result$message})tryCatch({
9: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
if (identical(call[[1L]], quote(doTryCatch))) 6: tryCatchList(expr, classes, parentenv, handlers) mi = mi, opts = mi$options)FUN(X[[i]], ...)
10: call <- sys.call(-4L) }})
dcall <- deparse(call, nlines = 1L)}, error = function(e) { prefix <- paste("Error in", dcall, ": ")lapply(X = S, FUN = FUN, ...) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] 7:
9: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")11: }) if (is.na(w)) doTryCatch(return(expr), name, parentenv, handler)
FUN(X[[i]], ...)
tryCatch({
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 8: 12: 10: type = "b")tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (w > LONG) system.time({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) prefix <- paste0(prefix, "\n ") mi = mi, opts = mi$options)}, error = function(e) {})13:
2: eval_f(x0, ...)
lapply(X = S, FUN = FUN, ...) 3:
8: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, system.time({tryCatchList(expr, classes, parentenv, handlers)
14: model <- mi$model } result <- NULL
Traceback:
model <- mi$model 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: tryCatch(expr, error = function(e) { mi = mi, opts = mi$options) tryCatch({ else prefix <- "Error : " result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, msg <- paste0(prefix, conditionMessage(e), "\n")
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: eval_f(x0, ...)11: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, call <- conditionCall(e) mi = mi, opts = mi$options) }, error = function(e) { }) .Internal(seterrmessage(msg[1L]))doTryCatch(return(expr), name, parentenv, handler) if (!is.null(result)) {
if (!silent && isTRUE(getOption("show.error.messages"))) {tryCatchList(expr, classes, parentenv, handlers) if (!is.null(call)) { mi = mi, opts = mi$options) 3:
}, error = function(e) { if (identical(call[[1L]], quote(doTryCatch)))
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({ })12: if (!is.null(result)) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) model$fail <- FALSE model$coefficients <- result$solution model$fail <- FALSE call <- sys.call(-4L) model <- mi$model cat(msg, file = outFile)
model$logLik <- as.numeric(-1 * result$objective) result <- NULLnloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 13: model$coefficients <- result$solution .Internal(printDeferredWarnings()) } tryCatch({tryCatchList(expr, classes, parentenv, handlers) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, model$iterations <- result$iterations mi = mi, opts = mi$options)
dcall <- deparse(call, nlines = 1L) mi = mi, opts = mi$options) model$logLik <- as.numeric(-1 * result$objective) }, error = function(e) { prefix <- paste("Error in", dcall, ": ") model$status <- result$status invisible(structure(msg, class = "try-error", condition = e))}) model$message <- result$message }
}) LONG <- 75L}) model$iterations <- result$iterations sm <- strsplit(conditionMessage(e), "\n")[[1L]]
if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution 4: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ model$logLik <- as.numeric(-1 * result$objective) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 14: model$status <- result$status
mi = mi, opts = mi$options) model$iterations <- result$iterations15: model$status <- result$status model$message <- result$messagetry(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: if (is.na(w)) }, error = function(e) { 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)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }})
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) model$message <- result$message})
tryCatch(expr, error = function(e) { }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution
} 9: 9: call <- conditionCall(e) model$logLik <- as.numeric(-1 * result$objective)16: FUN(X[[i]], ...)})
model$iterations <- result$iterations17: 9: if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch)))
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) call <- sys.call(-4L)10: 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)) FUN(X[[i]], ...)
18: lapply(X = S, FUN = FUN, ...) model$status <- result$status
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: model$message <- result$message11: doTryCatch(return(expr), name, parentenv, handler)17:
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) FUN(X[[i]], ...) }tryCatchList(expr, classes, parentenv, handlers)lapply(seq_len(cores), inner.do)FUN(X[[i]], ...) prefix <- paste0(prefix, "\n ")
type = "b")
14: tryCatch(expr, error = function(e) { call <- conditionCall(e)}) }
if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) 10: if (w > LONG) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")19:
else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n") LONG <- 75L18: lapply(seq_len(cores), inner.do)
prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")parallel::mclapply(miList, runModel, mc.cores = numCores) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: 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") .Internal(seterrmessage(msg[1L]))19: 9: lapply(X = S, FUN = FUN, ...) if (!silent && isTRUE(getOption("show.error.messages"))) {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")) 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))11: doTryCatch(return(expr), name, parentenv, handler)20: cat(msg, file = outFile)FUN(X[[i]], ...)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
23:
suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))withCallingHandlers(expr, warning = function(w) if (inherits(w, .Internal(printDeferredWarnings())
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:
24: 17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
invisible(structure(msg, class = "try-error", condition = e))10: classes)) tryInvokeRestart("muffleWarning"))lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)runMultistart(modelInputs)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
12: })
21: 20: 25: withCallingHandlers(expr, warning = function(w) if (inherits(w, logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat",
13: classes)) tryInvokeRestart("muffleWarning"))suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
tryCatchList(expr, classes, parentenv, handlers)tryCatchOne(expr, names, parentenv, handlers[[1L]]) "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
15:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: 21: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))14:
26: eval(expr, envir)
27: eval(expr, envir)
28: 17: 13: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))22: withVisible(eval(expr, envir))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],
FUN(X[[i]], ...)22: tryCatchList(expr, classes, parentenv, handlers)29: withCallingHandlers(expr, message = function(c) if (inherits(c, withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: 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"))) { classes)) tryInvokeRestart("muffleMessage"))
runMultistart(modelInputs)
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)22:
withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: 25: prefix <- paste("Error in", dcall, ": ")withCallingHandlers(code, error = function (e) cat(msg, file = outFile)
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)rlang::entrace(e), message = function (cnd) 18: lapply(seq_len(cores), inner.do){
.Internal(printDeferredWarnings()) watcher$capture_plot_and_output()
runMultistart(modelInputs)28: 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) {
logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)withVisible(eval(expr, envir))
cnd <- sanitize_call(cnd) } 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))19: watcher$push(cnd) invisible(structure(msg, class = "try-error", condition = e))
})26: } if (on_warning$silence) { invokeRestart("muffleWarning")29: 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)) }}, error = function (cnd) 25: withCallingHandlers(code, error = function (e) eval(expr, envir){logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)
22: withCallingHandlers(expr, message = function(c) if (inherits(c,
27: watcher$capture_plot_and_output()rlang::entrace(e), message = function (cnd) {eval(expr, envir) cnd <- sanitize_call(cnd)
classes)) tryInvokeRestart("muffleMessage"))})
26:
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
watcher$push(cnd)15: 24: eval(expr, envir)
watcher$capture_plot_and_output()
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: if (on_message$capture) { watcher$push(cnd) } switch(on_error, continue = invokeRestart("eval_continue"), runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)
26: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) stop = invokeRestart("eval_stop"), error = NULL)})
30: eval(call)
31: eval(call)
32: eval(expr, envir)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (on_message$silence) {28:
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: with_handlers({ invokeRestart("muffleMessage") } for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))}, warning = function (cnd) {withCallingHandlers(code, error = function (e) withVisible(eval(expr, envir)) watcher$capture_plot_and_output()
watcher$print_value(ev$value, ev$visible, envir)
rlang::entrace(e), message = function (cnd) 27: }eval(expr, envir)17: 29: if (getOption("warn") >= 2 || getOption("warn") < 0) {
{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_message$capture) { watcher$capture_plot_and_output() return() } watcher$capture_plot_and_output() TRUE
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) watcher$push(cnd)withCallingHandlers(code, error = function (e) if (on_warning$capture) {FUN(X[[i]], ...)}, handlers) } if (on_warning$capture) {
rlang::entrace(e), message = function (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)
{ watcher$capture_plot_and_output() if (on_message$capture) { cnd <- sanitize_call(cnd) 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:
watcher$push(cnd)31: watcher$push(cnd)33: 17: eval(call) }18: lapply(seq_len(cores), inner.do)
19: if (on_message$silence) {
doWithOneRestart(return(expr), restart) invokeRestart("muffleMessage")eval(call)
}
FUN(X[[i]], ...)parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
18: lapply(seq_len(cores), inner.do)
19: }, warning = function (cnd) parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: 32: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))21: }suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))with_handlers({34: { if (getOption("warn") >= 2 || getOption("warn") < 0) { for (expr in tle$exprs) {
withOneRestart(expr, restarts[[1L]])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) return() if (on_warning$silence) {
} invokeRestart("muffleWarning") ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) watcher$capture_plot_and_output()22: if (on_warning$capture) {22: }withCallingHandlers(expr, message = function(c) if (inherits(c, 35: } TRUE classes)) tryInvokeRestart("muffleMessage"))}, error = function (cnd) }, handlers)
cnd <- sanitize_call(cnd)33: {withRestartList(expr, restarts[-nr])
36:
doWithOneRestart(return(expr), restart) watcher$capture_plot_and_output()23: 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"),
withCallingHandlers(expr, message = function(c) if (inherits(c, doWithOneRestart(return(expr), restart)suppressMessages(suppressWarnings(parallel::mclapply(miList, classes)) tryInvokeRestart("muffleMessage"))34:
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
cnd <- sanitize_call(cnd) runModel, mc.cores = numCores)))33:
watcher$push(cnd)23:
suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", withOneRestart(expr, restarts[[1L]]) switch(on_error, continue = invokeRestart("eval_continue"), doWithOneRestart(return(expr), restart) stop = invokeRestart("eval_stop"), error = NULL)
stop = invokeRestart("eval_stop"), error = NULL)24: 38: })withRestartList(expr, restarts) "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)
34:
runMultistart(modelInputs)})withOneRestart(expr, restarts[[1L]])
30:
35: withRestartList(expr, restarts[-nr])
35:
30: 36: withRestartList(expr, restarts[-nr])
39: doWithOneRestart(return(expr), restart)withRestarts(with_handlers({
37: for (expr in tle$exprs) {25: 36: eval(call)eval(call)
31: eval(call)
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } ev <- withVisible(eval(expr, envir))
26: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])31: eval(call)
38: watcher$capture_plot_and_output() TRUEeval(expr, envir)doWithOneRestart(return(expr), restart)withRestartList(expr, restarts)
watcher$print_value(ev$value, ev$visible, envir)37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) }}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]]) "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)
32: 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)
with_handlers({
39: 26: eval(expr, envir)
withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))
}
35: if (on_message$silence) { for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))27: 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)
eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, error = function (e) 40: 38: 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: watcher$capture_plot_and_output()37: rlang::entrace(e), message = function (cnd) invokeRestart("muffleMessage"){ 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$print_value(ev$value, ev$visible, envir) watcher$capture_plot_and_output()withRestartList(expr, restarts)withRestartList(expr, restarts[-nr])in_dir(input_dir(), expr) if (on_warning$capture) {
cnd <- sanitize_call(cnd)39: }
36: doWithOneRestart(return(expr), restart)
37: 43: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) watcher$push(cnd) } }withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])withRestarts(with_handlers({}, warning = function (cnd)
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) TRUE if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { 0L{
for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()in_input_dir(evaluate(code, envir = env, new_device = FALSE, }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (getOption("warn") >= 2 || getOption("warn") < 0) {
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)
watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)38: 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))) return() cnd <- sanitize_call(cnd) else 2L43:
}, output_handler = knit_handlers(options$render, options)) }in_input_dir(evaluate(code, envir = env, new_device = FALSE, watcher$push(cnd) watcher$capture_plot_and_output() switch(on_error, continue = invokeRestart("eval_continue"),
keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }44: TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
keep_message = if (is.numeric(options$message)) TRUE else options$message, 42: in_dir(input_dir(), expr)40:
withRestartList(expr, restarts)eng_r(options)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 {43: stop = invokeRestart("eval_stop"), error = NULL) if (on_warning$capture) {
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()))in_input_dir(evaluate(code, envir = env, new_device = FALSE, 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)})}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) 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)
51: process_file(text, output)
52: 39: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
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]]) cnd <- sanitize_call(cnd)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) watcher$push(cnd)30: eval(call)
31: eval(call)
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,
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) }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: } 0L keep_message = if (is.numeric(options$message)) TRUE else options$message, if (options$error && options$include) }, error = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_warning$silence) { else 2L stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L watcher$capture_plot_and_output()
invokeRestart("muffleWarning") }, output_handler = knit_handlers(options$render, options)) }, output_handler = knit_handlers(options$render, options)))
OK <<- FALSE42: 0L watcher$print_value(ev$value, ev$visible, envir)
57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
}in_dir(input_dir(), expr)44: message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})}, error = function (cnd) } TRUE58:
else 2L{43:
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/RtmpiidpGf/file270473410613.rds")
watcher$capture_plot_and_output()}, handlers) cnd <- sanitize_call(cnd) }, output_handler = knit_handlers(options$render, options))in_input_dir(evaluate(code, envir = env, new_device = FALSE, watcher$push(cnd)tryCatchList(expr, classes, parentenv, handlers)
eng_r(options) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message,
switch(on_error, continue = invokeRestart("eval_continue"), 42: stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) in_dir(input_dir(), expr)
0L else 2L }, output_handler = knit_handlers(options$render, options)))An irrecoverable exception occurred. R is aborting now ...
44: eng_r(options)
45: block_exec(params)
46: call_block(x)
47: 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/RtmpiidpGf/file270473410613.rds")
An irrecoverable exception occurred. R is aborting now ...
process_group(group)
48: 45:
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
stop = invokeRestart("eval_stop"), error = NULL)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) })
30: eval(call)
31: 43: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), eval(call)block_exec(params)in_input_dir(evaluate(code, envir = env, new_device = FALSE, 0L error = function(e) {
else 2L keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (progress && is.function(pb$interrupt)) pb$interrupt() }, 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) if (is_R_CMD_build() || is_R_CMD_check())
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)) error <<- format(e) 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: 32: 0Lwith_handlers({withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { pb$interrupt() 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: if (is_R_CMD_build() || is_R_CMD_check()) else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: block_exec(params)
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)) }), 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)) withRestarts(with_handlers({ 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(...) pb$interrupt()46: if (is_R_CMD_build() || is_R_CMD_check()) call_block(x)
if (progress && is.function(pb$interrupt)) for (expr in tle$exprs) { error <<- format(e) })
49:
55: engine$weave(file, quiet = quiet, encoding = enc) pb$interrupt()
56: doTryCatch(return(expr), name, parentenv, handler)
57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: tryCatchList(expr, classes, parentenv, handlers)
59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) ev <- withVisible(eval(expr, envir))with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) output <- find_vignette_product(name, by = "weave", engine = engine) if (progress && is.function(pb$interrupt)) if (is_R_CMD_build() || is_R_CMD_check()) 47: pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) process_group(group) if (!have.makefile && vignette_is_tex(output)) { 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) error <<- format(e) }), list(rlang_trace_top_env = knit_global()))
50: 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), }
TRUE51: 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(), ...)
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) engine = engine)48: }}, 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/RtmpiidpGf/file270473410613.rds")
An irrecoverable exception occurred. R is aborting now ...
54: vweave_rmarkdown(...)40: error = function(e) {withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
evaluate::evaluate(...)55: 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) { error = function(e) { if (progress && is.function(pb$interrupt))
engine$weave(file, quiet = quiet, encoding = enc)41: setwd(wd) pb$interrupt()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) write_utf8(res, output %n% stdout()) if (is_R_CMD_build() || is_R_CMD_check()) paste0("\nQuitting from ", loc, if (!is.null(error))
paste0("\n", rule(), error, "\n", rule()))
error <<- format(e) })56:
}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)49: 46: doTryCatch(return(expr), name, parentenv, handler)
with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 57: call_block(x)
error = function(e) {47: tryCatchOne(expr, names, parentenv, handlers[[1L]])51: 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: process_group(group)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
process_file(text, output)48: output_dir = getwd(), ...)58: tryCatchList(expr, classes, parentenv, handlers)withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
54: vweave_rmarkdown(...)
59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc)55: error = function(e) { setwd(startdir)engine$weave(file, quiet = quiet, encoding = enc)52:
output <- find_vignette_product(name, by = "weave", engine = engine) if (progress && is.function(pb$interrupt)) if (!have.makefile && vignette_is_tex(output)) {56: pb$interrupt()doTryCatch(return(expr), name, parentenv, handler)knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
texi2pdf(file = output, clean = FALSE, quiet = quiet)57: 53: if (is_R_CMD_build() || is_R_CMD_check()) tryCatchOne(expr, names, parentenv, handlers[[1L]]) output <- find_vignette_product(name, by = "texi2pdf", error <<- format(e) engine = engine) }}, error = function(e) { OK <<- FALSE })
rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), file, conditionMessage(e))) 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()))})58: tryCatchList(expr, classes, parentenv, handlers)
50: 54: 60: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", vweave_rmarkdown(...)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()) 59: TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file270473410613.rds") error <<- format(e)
55: engine$weave(file, quiet = quiet, encoding = enc)
56: doTryCatch(return(expr), name, parentenv, handler)
57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) }), list(rlang_trace_top_env = knit_global())), function(loc) {58: 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)
An irrecoverable exception occurred. R is aborting now ...
tryCatchList(expr, classes, parentenv, handlers)
59: tryCatch({
setwd(startdir)51: 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)))}) engine$weave(file, quiet = quiet, encoding = enc)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: setwd(startdir)
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/RtmpiidpGf/file270473410613.rds")
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) output <- find_vignette_product(name, by = "weave", engine = engine)
if (!have.makefile && vignette_is_tex(output)) {An irrecoverable exception occurred. R is aborting now ...
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/RtmpiidpGf/file270473410613.rds")
An irrecoverable exception occurred. R is aborting now ...
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/RtmpiidpGf/file270473410613.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/RtmpiidpGf/file270430de1143.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/RtmpiidpGf/file270430de1143.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/RtmpiidpGf/file270430de1143.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/RtmpiidpGf/file270430de1143.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }
*** caught segfault ***
address 0x110, cause 'invalid permissions'
})
Traceback:
9: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13:
4: doTryCatch(return(expr), name, parentenv, handler)
5: 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))) 6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ 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)) 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
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, model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...) classes)) tryInvokeRestart("muffleMessage"))
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
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)
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]]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) { 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 ") 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) { } 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: 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({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"))
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)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:
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)eval(expr, envir)
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: 27: 40: eval(expr, envir)
28: withVisible(eval(expr, envir))evaluate::evaluate(...)
Traceback:
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 {
Traceback:
if (options$error && options$include) 1: 29: withCallingHandlers(code, error = function (e) nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...) mi = mi, opts = mi$options)rlang::entrace(e), message = function (cnd) mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
{ 0L else 2L
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, 2: watcher$capture_plot_and_output() }, output_handler = knit_handlers(options$render, options))
eval_f(x0, ...)42: 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)
in_dir(input_dir(), expr) } 3: mi = mi, opts = mi$options) }, error = function(e) { })
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: 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (!is.null(result)) {eng_r(options) mi = mi, opts = mi$options) model$fail <- FALSE
if (on_warning$silence) { invokeRestart("muffleWarning") mi = mi, opts = mi$options) }}, error = function (cnd) model$coefficients <- result$solution{ watcher$capture_plot_and_output() cnd <- sanitize_call(cnd)
watcher$push(cnd) model$logLik <- as.numeric(-1 * result$objective) 4: switch(on_error, continue = invokeRestart("eval_continue"),
45: block_exec(params) model$iterations <- result$iterations stop = invokeRestart("eval_stop"), error = NULL)})
30: eval(call)
31: eval(call) model$status <- result$statusdoTryCatch(return(expr), name, parentenv, handler)
model$message <- result$message }
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()
5: watcher$print_value(ev$value, ev$visible, envir) 4: })46: }tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: doTryCatch(return(expr), name, parentenv, handler)
tryCatch({ 9: call_block(x)
47: process_group(group)
48: TRUEwithCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
*** caught segfault ***
address 0x110, cause 'invalid permissions'
}, handlers) error = function(e) { if (progress && is.function(pb$interrupt)) FUN(X[[i]], ...) pb$interrupt()
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (is_R_CMD_build() || is_R_CMD_check())
5: 33: doWithOneRestart(return(expr), restart)tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers) mi = mi, opts = mi$options)10:
lapply(X = S, FUN = FUN, ...)34:
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)) {
withOneRestart(expr, restarts[[1L]]) model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations}, error = function(e) {11: model$status <- result$statusdoTryCatch(return(expr), name, parentenv, handler) model$message <- result$message }})
error <<- format(e)
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: })doTryCatch(return(expr), name, parentenv, handler)12:
49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) })
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]]) pb$interrupt()
35: if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)
13: withRestartList(expr, restarts[-nr]) }), list(rlang_trace_top_env = knit_global()))
tryCatchList(expr, classes, parentenv, handlers)
13: 36: doWithOneRestart(return(expr), restart)tryCatchList(expr, classes, parentenv, handlers) 8:
50:
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), system.time({
38: 14: tryCatch(expr, error = function(e) { model <- mi$modelwithRestartList(expr, restarts) result <- NULL tryCatch({14: tryCatch(expr, error = function(e) { call <- conditionCall(e) error = function(e) { call <- conditionCall(e) if (!is.null(call)) { 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)) if (progress && is.function(pb$interrupt)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (identical(call[[1L]], quote(doTryCatch))) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) call <- sys.call(-4L) mi = mi, opts = mi$options)
}, error = function(e) {39: withRestarts(with_handlers({ for (expr in tle$exprs) { }) error <<- format(e) ev <- withVisible(eval(expr, envir)) type = "b") if (!is.null(result)) { }), list(rlang_trace_top_env = knit_global())), function(loc) { dcall <- deparse(call, nlines = 1L) model$fail <- FALSE 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)
Traceback:
watcher$capture_plot_and_output() model$coefficients <- result$solution if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) model$logLik <- as.numeric(-1 * result$objective) prefix <- paste("Error in", dcall, ": ") watcher$print_value(ev$value, ev$visible, envir) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: }FUN(X[[i]], ...)
if (!silent && isTRUE(getOption("show.error.messages"))) {10: lapply(X = S, FUN = FUN, ...)
cat(msg, file = outFile) 1: 11: doTryCatch(return(expr), name, parentenv, handler) LONG <- 75L
51: process_file(text, output)
52: TRUE .Internal(printDeferredWarnings())mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: evaluate::evaluate(...)
sm <- strsplit(conditionMessage(e), "\n")[[1L]]12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: } invisible(structure(msg, class = "try-error", condition = e))knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)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) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
2: })
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) 53: eval_f(x0, ...)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
if (is.na(w)) 0L output_dir = getwd(), ...)
54: tryCatchList(expr, classes, parentenv, handlers) else 2L }, output_handler = knit_handlers(options$render, options)))15: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
try(lapply(X = S, FUN = FUN, ...), silent = TRUE) type = "b")
if (w > LONG) prefix <- paste0(prefix, "\n ")44: 5:
} 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())tryCatchOne(expr, names, parentenv, handlers[[1L]])
}16:
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)eng_r(options)
}, error = function(e) {})
invisible(structure(msg, class = "try-error", condition = e))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))14: tryCatch(expr, error = function(e) { call <- conditionCall(e) 8: })vweave_rmarkdown(...)
system.time({
55: engine$weave(file, quiet = quiet, encoding = enc)
56: doTryCatch(return(expr), name, parentenv, handler)15: model <- mi$model17: FUN(X[[i]], ...)
18: result <- NULL
if (!is.null(call)) { tryCatch({45: 57: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores) if (identical(call[[1L]], quote(doTryCatch))) mi = mi, opts = mi$options)block_exec(params)tryCatchOne(expr, names, parentenv, handlers[[1L]])
}, 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
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) model$status <- result$status call <- sys.call(-4L)46: call_block(x)
47: dcall <- deparse(call, nlines = 1L)58: model$message <- result$messageprocess_group(group)tryCatchList(expr, classes, parentenv, handlers)
59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)
16: prefix <- paste("Error in", dcall, ": ") output <- find_vignette_product(name, by = "weave", engine = engine) 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], sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (!have.makefile && vignette_is_tex(output)) { type = "b")
texi2pdf(file = output, clean = FALSE, quiet = quiet)22:
}withCallingHandlers(expr, message = function(c) if (inherits(c, if (w > LONG) })17: output <- find_vignette_product(name, by = "texi2pdf", FUN(X[[i]], ...) classes)) tryInvokeRestart("muffleMessage")) prefix <- paste0(prefix, "\n ") engine = engine) }}, error = function(e) { OK <<- FALSE
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
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), 23:
suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})logitr(data = cars_us, outcome = "choice", obsID = "obsnum", 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) { file, conditionMessage(e)))12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
setwd(wd)})18:
13: 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))
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"))) {15: cat(msg, file = outFile)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 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)
22:
pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100",
16: .Internal(printDeferredWarnings())57: "bev150", "american", "japanese", "chinese", "skorean", withCallingHandlers(expr, message = function(c) if (inherits(c, sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) classes)) tryInvokeRestart("muffleMessage"))
60: tryCatchOne(expr, names, parentenv, handlers[[1L]]) }17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
58: invisible(structure(msg, class = "try-error", condition = e)) "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10)tryCatchList(expr, classes, parentenv, handlers)
26: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 19: })eval(expr, envir)
27: eval(expr, envir)parallel::mclapply(miList, runModel, mc.cores = numCores)
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file270430de1143.rds")
runMultistart(modelInputs)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))28:
59: tryCatch({An irrecoverable exception occurred. R is aborting now ...
withVisible(eval(expr, envir))
engine$weave(file, quiet = quiet, encoding = enc)29:
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: withCallingHandlers(code, error = function (e) 25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", rlang::entrace(e), message = function (cnd) pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10)
{15: 26: watcher$capture_plot_and_output()try(lapply(X = S, FUN = FUN, ...), silent = TRUE)suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))eval(expr, envir)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
27: 17: setwd(startdir) if (on_message$capture) {
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"), eval(expr, envir) watcher$push(cnd) output <- find_vignette_product(name, by = "weave", engine = engine) scalePar = "price", robust = TRUE, numMultiStarts = 10)
} if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) if (on_message$silence) {
28: invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() }withVisible(eval(expr, envir))26: watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) eval(expr, envir)FUN(X[[i]], ...){ output <- find_vignette_product(name, by = "texi2pdf",
29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = 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)})
30: eval(call)
31: eval(call)
32: if (on_message$capture) {with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))27: engine = engine)eval(expr, envir) }18: }, error = function(e) {lapply(seq_len(cores), inner.do)
19: watcher$capture_plot_and_output() OK <<- FALSEparallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
watcher$push(cnd)
watcher$print_value(ev$value, ev$visible, envir) } if (on_message$silence) {28: }21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) invokeRestart("muffleMessage")
TRUE }}, warning = function (cnd) {}, handlers) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart) if (getOption("warn") >= 2 || getOption("warn") < 0) {
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)withVisible(eval(expr, envir))
} return() }60: TRUE
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)29: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", withCallingHandlers(code, error = function (e) TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file270430de1143.rds")22:
An irrecoverable exception occurred. R is aborting now ...
rlang::entrace(e), message = function (cnd)
{40: watcher$capture_plot_and_output() watcher$capture_plot_and_output() if (on_message$capture) {withCallingHandlers(expr, message = function(c) if (inherits(c, if (on_warning$capture) { watcher$push(cnd)evaluate::evaluate(...) } if (on_message$silence) {
41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") } classes)) tryInvokeRestart("muffleMessage")) invokeRestart("muffleMessage")}, error = function (cnd) keep_message = if (is.numeric(options$message)) TRUE else options$message,
stop_on_error = if (is.numeric(options$error)) options$error else { }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { if (options$error && options$include) 23: 0L{ watcher$capture_plot_and_output() return() else 2L }, output_handler = knit_handlers(options$render, options)) }suppressMessages(suppressWarnings(parallel::mclapply(miList,
cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)})
30: eval(call) 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)}) runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)31: 30: 42: in_dir(input_dir(), expr)
eval(call)eval(call)
31: eval(call)
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,
watcher$print_value(ev$value, ev$visible, envir) } keep_message = if (is.numeric(options$message)) TRUE else options$message, 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"), stop_on_error = if (is.numeric(options$error)) options$error else { scalePar = "price", robust = TRUE, numMultiStarts = 10)32:
26: eval(expr, envir)
27: eval(expr, envir) TRUEwith_handlers({}, handlers)
for (expr in tle$exprs) {33: ev <- withVisible(eval(expr, envir))doWithOneRestart(return(expr), restart)
28: withVisible(eval(expr, envir)) watcher$capture_plot_and_output()
watcher$print_value(ev$value, ev$visible, envir) }29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (options$error && options$include)
0L else 2L34: TRUE}, handlers)
}, output_handler = knit_handlers(options$render, options))) if (on_message$capture) {33: withOneRestart(expr, restarts[[1L]]) watcher$push(cnd)doWithOneRestart(return(expr), restart)
44: }35: 34: withRestartList(expr, restarts[-nr])eng_r(options) if (on_message$silence) {
invokeRestart("muffleMessage")withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
}45: 36: doWithOneRestart(return(expr), restart)}, warning = function (cnd) {
block_exec(params)36: 37: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } if (getOption("warn") >= 2 || getOption("warn") < 0) {46: TRUEcall_block(x)}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
return() }
watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning")39: withRestarts(with_handlers({ for (expr in tle$exprs) {40: evaluate::evaluate(...) 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, 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, }47: keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd)process_group(group) watcher$push(cnd)
switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL) keep_message = if (is.numeric(options$message)) TRUE else options$message, 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) error <<- format(e) })
}) stop_on_error = if (is.numeric(options$error)) options$error else {
0L if (options$error && options$include) 49: else 2L 0L else 2L }, output_handler = knit_handlers(options$render, options)))
with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 44: 30: error = function(e) {eval(call)
31: if (progress && is.function(pb$interrupt)) pb$interrupt()eval(call)
if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)eng_r(options)32: }), list(rlang_trace_top_env = knit_global()))
}, output_handler = knit_handlers(options$render, options)))
with_handlers({
for (expr in tle$exprs) {45: 44: ev <- withVisible(eval(expr, envir))eng_r(options)
45: block_exec(params)
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()block_exec(params) if (is_R_CMD_build() || is_R_CMD_check()) 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)46: error <<- format(e)46: }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd)call_block(x)
write_utf8(res, output %n% stdout())call_block(x)
47:
process_group(group)
48: paste0("\nQuitting from ", loc, if (!is.null(error)) 37: paste0("\n", rule(), error, "\n", rule()))47: }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { error = function(e) {51: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) if (progress && is.function(pb$interrupt)) process_file(text, output) if (progress && is.function(pb$interrupt))
pb$interrupt() pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) })38:
withRestartList(expr, restarts)52: if (is_R_CMD_build() || is_R_CMD_check())
39: withRestarts(with_handlers({ for (expr in tle$exprs) { error <<- format(e)knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)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())) 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(...)
49: 53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e)50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() output_dir = getwd(), ...) }), list(rlang_trace_top_env = knit_global())) 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)
54: 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)vweave_rmarkdown(...)
51: 41: 51: 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 2Lprocess_file(text, output)
52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
55: }, output_handler = knit_handlers(options$render, options))53: process_file(text, output)engine$weave(file, quiet = quiet, encoding = enc)
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)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
54: vweave_rmarkdown(...)
56: doTryCatch(return(expr), name, parentenv, handler)
57: tryCatchOne(expr, names, parentenv, handlers[[1L]])42: 55:
in_dir(input_dir(), expr)
engine$weave(file, quiet = quiet, encoding = enc)57:
56: doTryCatch(return(expr), name, parentenv, handler)
57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: tryCatchList(expr, classes, parentenv, handlers)
59: tryCatchOne(expr, names, parentenv, handlers[[1L]])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)))
58: 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 <<- FALSEtryCatchList(expr, classes, parentenv, handlers)
message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
59: 58: file, conditionMessage(e)))})
60: 44: 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/RtmpiidpGf/file270430de1143.rds")
eng_r(options)tryCatch({ engine$weave(file, quiet = quiet, encoding = enc)An irrecoverable exception occurred. R is aborting now ...
setwd(startdir)tryCatchList(expr, classes, parentenv, handlers) output <- find_vignette_product(name, by = "weave", engine = engine)
if (!have.makefile && vignette_is_tex(output)) {59:
45: block_exec(params)
46: texi2pdf(file = output, clean = FALSE, quiet = quiet)tryCatch({ engine$weave(file, quiet = quiet, encoding = enc)call_block(x) 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)
47: process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { } 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/RtmpiidpGf/file270430de1143.rds")
An irrecoverable exception occurred. R is aborting now ...
if (progress && is.function(pb$interrupt)) }, error = function(e) { pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) })
49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) 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/RtmpiidpGf/file270430de1143.rds")
An irrecoverable exception occurred. R is aborting now ...
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/RtmpiidpGf/file270430de1143.rds")
An irrecoverable exception occurred. R is aborting now ...
Quitting from mnl_models_weighted.Rmd:64-80 [unnamed-chunk-3]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `names(x) <- value`:
! 'names' attribute [3] must be the same length as the vector [0]
---
Backtrace:
▆
1. └─logitr::logitr(...)
2. └─logitr:::getMultistartSummary(allModels)
3. └─base::`colnames<-`(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'mnl_models_weighted.Rmd' failed with diagnostics:
'names' attribute [3] must be the same length as the vector [0]
--- failed re-building ‘mnl_models_weighted.Rmd’
--- re-building ‘mxl_models.Rmd’ using rmarkdown
--- finished re-building ‘mxl_models.Rmd’
--- re-building ‘predict.Rmd’ using rmarkdown
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)})
30: eval(call)
31: eval(call)
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: evaluate::evaluate(...)
41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr)
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: block_exec(params)
46: call_block(x)
47: process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) })
49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global()))
50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
51: process_file(text, output)
52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
54: vweave_rmarkdown(...)
55: engine$weave(file, quiet = quiet, encoding = enc)
56: doTryCatch(return(expr), name, parentenv, handler)
57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: tryCatchList(expr, classes, parentenv, handlers)
59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file2704e75bc0e.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'
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)
Traceback:
Traceback:
1: } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() }mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 1: watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) eval_f(x0, ...)
{ watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)})
30: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
2: eval_f(x0, ...)eval(call)
Traceback:
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) }
1: TRUE 3:
*** caught segfault ***
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, address 0x110, cause 'invalid permissions'
}, handlers)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) mi = mi, opts = mi$options)
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
36: 2: 6: doWithOneRestart(return(expr), restart)
tryCatchList(expr, classes, parentenv, handlers) 4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({eval_f(x0, ...)
*** caught segfault ***
address 0x110, cause 'invalid permissions'
37: 7: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatch({
withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
*** caught segfault ***
mi = mi, opts = mi$options)address 0x110, cause 'invalid permissions'
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 3:
mi = mi, opts = mi$options)}, error = function(e) {})}, error = function(e) {38: withRestartList(expr, restarts)
8: 39: system.time({withRestarts(with_handlers({ model <- mi$model result <- NULL tryCatch({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() result <- 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)}) 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]], ...)
*** caught segfault ***
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
address 0x110, cause 'invalid permissions'
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: watcher$print_value(ev$value, ev$visible, envir)
8: }tryCatch(expr, error = function(e) {
4: 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) TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: }, error = function(e) {doTryCatch(return(expr), name, parentenv, handler) })evaluate::evaluate(...) if (!is.null(result)) { model$fail <- FALSE
41:
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])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,
Traceback:
model$coefficients <- result$solution stop_on_error = if (is.numeric(options$error)) options$error else { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) if (options$error && options$include) 6: dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L 1: model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations 0L model$status <- result$status sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) model$message <- result$message }})
9: else 2L }, output_handler = knit_handlers(options$render, options))
Traceback:
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], tryCatchList(expr, classes, parentenv, handlers) 1:
2: eval_f(x0, ...)
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
42: in_dir(input_dir(), expr)
3:
2: eval_f(x0, ...)
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,
Traceback:
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 7: 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]])
tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: 6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, FUN(X[[i]], ...) 4:
type = "b")
if (w > LONG) keep_message = if (is.numeric(options$message)) TRUE else options$message, mi = mi, opts = mi$options) 3: prefix <- paste0(prefix, "\n ")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) { })}, error = function(e) {
*** caught segfault ***
}system.time({nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, stop_on_error = if (is.numeric(options$error)) options$error else {
Traceback:
10: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) model <- mi$model}) mi = mi, opts = mi$options)lapply(X = S, FUN = FUN, ...)address 0x110, cause 'invalid permissions'
if (!is.null(result)) { else prefix <- "Error : "
2: if (options$error && options$include) eval_f(x0, ...) msg <- paste0(prefix, conditionMessage(e), "\n")
model$fail <- FALSE 8: 0L result <- NULL 4: else 2LdoTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
}, output_handler = knit_handlers(options$render, options))) model$coefficients <- result$solution
.Internal(seterrmessage(msg[1L])) model$logLik <- as.numeric(-1 * result$objective) tryCatch({system.time({
6: 44: eng_r(options)
tryCatchList(expr, classes, parentenv, handlers)45: model$iterations <- result$iterations if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) model$status <- result$status
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, } 3: 7: mi = mi, opts = mi$options)11: block_exec(params) model$message <- result$message }, error = function(e) {tryCatch({
}46: }) model <- mi$model})call_block(x) if (!is.null(result)) { result <- NULL model$fail <- FALSE model$coefficients <- result$solutiondoTryCatch(return(expr), name, parentenv, handler)
tryCatch({ 9:
12: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...) model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, invisible(structure(msg, class = "try-error", condition = e))})
15: tryCatchOne(expr, names, parentenv, handlers[[1L]]) mi = mi, opts = mi$options)
Traceback:
1:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)11: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }}, error = function(e) {
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: })
tryCatchList(expr, classes, parentenv, handlers)
7: 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) {16: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) })})
9: })47: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))process_group(group) if (!is.null(result)) { if (!is.null(result)) {
doTryCatch(return(expr), name, parentenv, handler)FUN(X[[i]], ...) model$fail <- FALSE
13: 4: model$coefficients <- result$solution model$fail <- FALSE
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: 17: 8:
tryCatch(expr, error = function(e) {tryCatchList(expr, classes, parentenv, handlers)10: doTryCatch(return(expr), name, parentenv, handler)48:
FUN(X[[i]], ...)
18: call <- conditionCall(e)
withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) model$status <- result$status error = function(e) { 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
model$message <- result$messagelapply(X = S, FUN = FUN, ...)14: if (progress && is.function(pb$interrupt)) model$logLik <- as.numeric(-1 * result$objective) }lapply(seq_len(cores), inner.do) 6:
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)
pb$interrupt()
19: parallel::mclapply(miList, runModel, mc.cores = numCores)})system.time({16: call <- sys.call(-4L)tryCatch(expr, error = function(e) { if (is_R_CMD_build() || is_R_CMD_check())
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
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()))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) call <- conditionCall(e)tryCatchList(expr, classes, parentenv, handlers) if (!is.null(call)) {
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) if (identical(call[[1L]], quote(doTryCatch))) model <- mi$model
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) {17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19:
result <- NULL20: model$iterations <- result$iterationsparallel::mclapply(miList, runModel, mc.cores = numCores) 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") call <- sys.call(-4L)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, 13: model$status <- result$statustryCatchList(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, ": ") }) if (!is.null(result)) { if (is.na(w)) tryCatch({withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], dcall <- deparse(call, nlines = 1L) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, model$fail <- FALSE classes)) tryInvokeRestart("muffleWarning")) prefix <- paste("Error in", dcall, ": ") LONG <- 75L model$message <- result$message mi = mi, opts = mi$options) LONG <- 75L50:
}, error = function(e) { 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()) }21: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), })})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
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) error = function(e) { if (progress && is.function(pb$interrupt)) if (!is.null(result)) { }13: sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") model$fail <- FALSE pb$interrupt() sm <- strsplit(conditionMessage(e), "\n")[[1L]]21: model$coefficients <- result$solution26: invisible(structure(msg, class = "try-error", condition = e))})
if (is_R_CMD_build() || is_R_CMD_check()) eval(expr, envir)
model$logLik <- as.numeric(-1 * result$objective)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) model$coefficients <- result$solution15: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")tryCatchList(expr, classes, parentenv, handlers)
14:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE) model$logLik <- as.numeric(-1 * result$objective)27: model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 22: error <<- format(e)eval(expr, envir) model$iterations <- result$iterations13: if (is.na(w)) tryCatch(expr, error = function(e) { }), list(rlang_trace_top_env = knit_global())), function(loc) {
model$status <- result$statustryCatchList(expr, classes, parentenv, handlers) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
setwd(wd)withCallingHandlers(expr, message = function(c) if (inherits(c, model$message <- result$message type = "b") type = "b") if (w > LONG) write_utf8(res, output %n% stdout())
call <- conditionCall(e)28: if (w > LONG) prefix <- paste0(prefix, "\n ") paste0("\nQuitting from ", loc, if (!is.null(error)) 16: classes)) tryInvokeRestart("muffleMessage"))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: prefix <- paste0(prefix, "\n ") }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) lapply(seq_len(cores), inner.do) }})
9: FUN(X[[i]], ...)
10: withVisible(eval(expr, envir)) else prefix <- "Error : " prefix <- paste0(prefix, "\n ") }
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)) { } paste0("\n", rule(), error, "\n", rule()))
19: if (!is.null(call)) {parallel::mclapply(miList, runModel, mc.cores = numCores)}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) else prefix <- "Error : "29: msg <- paste0(prefix, conditionMessage(e), "\n") msg <- paste0(prefix, conditionMessage(e), "\n")
if (identical(call[[1L]], quote(doTryCatch))) else prefix <- "Error : " if (identical(call[[1L]], quote(doTryCatch))) .Internal(seterrmessage(msg[1L]))20: msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) call <- sys.call(-4L) if (!silent && isTRUE(getOption("show.error.messages"))) {withCallingHandlers(code, error = function (e)
51: 23: if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) }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)
.Internal(seterrmessage(msg[1L]))process_file(text, output) cat(msg, file = outFile) 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], invisible(structure(msg, class = "try-error", condition = e)) .Internal(printDeferredWarnings()) if (!silent && isTRUE(getOption("show.error.messages"))) {
rlang::entrace(e), message = function (cnd) withCallingHandlers(expr, warning = function(w) if (inherits(w, }) } cat(msg, file = outFile) type = "b"){ classes)) tryInvokeRestart("muffleWarning")) call <- sys.call(-4L)
.Internal(printDeferredWarnings()) if (w > LONG) 27:
prefix <- paste0(prefix, "\n ") watcher$capture_plot_and_output() } dcall <- deparse(call, nlines = 1L)15: 52: } if (on_message$capture) { invisible(structure(msg, class = "try-error", condition = e))eval(expr, envir) prefix <- paste("Error in", dcall, ": ") invisible(structure(msg, class = "try-error", condition = e)) else prefix <- "Error : " watcher$push(cnd)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
21: LONG <- 75L msg <- paste0(prefix, conditionMessage(e), "\n")knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) .Internal(seterrmessage(msg[1L]))28: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) } if (!silent && isTRUE(getOption("show.error.messages"))) { sm <- strsplit(conditionMessage(e), "\n")[[1L]]})}) if (on_message$silence) {
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: cat(msg, file = outFile) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() }
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")
15: if (is.na(w)) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))22:
53: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], .Internal(printDeferredWarnings()) type = "b")16:
withCallingHandlers(expr, message = function(c) if (inherits(c, watcher$capture_plot_and_output() }rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) output_dir = getwd(), ...)
54: } if (w > LONG) invisible(structure(msg, class = "try-error", condition = e))
classes)) tryInvokeRestart("muffleMessage"))})}, warning = function (cnd) 17: prefix <- paste0(prefix, "\n ")16: if (on_warning$capture) {
{vweave_rmarkdown(...) }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
if (getOption("warn") >= 2 || getOption("warn") < 0) {
else prefix <- "Error : "17: 23:
cnd <- sanitize_call(cnd)15: 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)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)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:
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
37: 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: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))runMultistart(modelInputs)FUN(X[[i]], ...)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
return()FUN(X[[i]], ...)
eval(expr, envir)
28: if (!silent && isTRUE(getOption("show.error.messages"))) { }18:
55: withVisible(eval(expr, envir))
watcher$capture_plot_and_output()
lapply(seq_len(cores), inner.do) cat(msg, file = outFile)
18: 28: 38:
18: 29: engine$weave(file, quiet = quiet, encoding = enc)lapply(seq_len(cores), inner.do) .Internal(printDeferredWarnings()) if (on_warning$capture) {lapply(seq_len(cores), inner.do)withVisible(eval(expr, envir))withRestartList(expr, restarts)19: }withCallingHandlers(code, error = function (e)
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/RtmpiidpGf/file2704e75bc0e.rds")
An irrecoverable exception occurred. R is aborting now ...
19: parallel::mclapply(miList, runModel, mc.cores = numCores) invisible(structure(msg, class = "try-error", condition = e))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) {})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
cnd <- sanitize_call(cnd)
if (getOption("warn") >= 2 || getOption("warn") < 0) {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)
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: rlang::entrace(e), message = function (cnd) 43: 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output()with_handlers({{withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
for (expr in tle$exprs) {in_input_dir(evaluate(code, envir = env, new_device = FALSE, parallel::mclapply(miList, runModel, mc.cores = numCores) cnd <- sanitize_call(cnd) watcher$push(cnd) ev <- withVisible(eval(expr, envir))22: withCallingHandlers(expr, message = function(c) if (inherits(c, watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)
classes)) tryInvokeRestart("muffleMessage"))
23: switch(on_error, continue = invokeRestart("eval_continue"), 21: stop = invokeRestart("eval_stop"), error = NULL)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
watcher$capture_plot_and_output()34: keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, })
20: 17: if (on_message$capture) {suppressMessages(suppressWarnings(parallel::mclapply(miList, keep_message = if (is.numeric(options$message)) TRUE else options$message, withOneRestart(expr, restarts[[1L]])withCallingHandlers(expr, warning = function(w) if (inherits(w, watcher$push(cnd)22:
30: stop_on_error = if (is.numeric(options$error)) options$error else {withCallingHandlers(expr, message = function(c) if (inherits(c,
classes)) tryInvokeRestart("muffleMessage"))FUN(X[[i]], ...) if (options$error && options$include) runModel, mc.cores = numCores)))
35: classes)) tryInvokeRestart("muffleWarning"))withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
0L
eval(call)18: 24: 21:
suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))runMultistart(modelInputs)23:
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))suppressMessages(suppressWarnings(parallel::mclapply(miList, else 2L31: 38: }, output_handler = knit_handlers(options$render, options)))
}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) if (on_message$silence) {eval(call)
lapply(seq_len(cores), inner.do)withRestartList(expr, restarts)
rlang::entrace(e), message = function (cnd) 32: { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) {
44: invokeRestart("muffleMessage") runModel, mc.cores = numCores))) if (getOption("warn") >= 2 || getOption("warn") < 0) { }19: eng_r(options)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)with_handlers({parallel::mclapply(miList, runModel, mc.cores = numCores)
45: block_exec(params)27: 39: }, warning = function (cnd) return() for (expr in tle$exprs) { }
{46: eval(expr, envir) 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)
20: withRestarts(with_handlers({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) } 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) { invokeRestart("muffleWarning") }}, error = function (cnd) if (on_message$silence) {call_block(x) watcher$capture_plot_and_output()24: withCallingHandlers(expr, warning = function(w) if (inherits(w, { for (expr in tle$exprs) {33:
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) watcher$capture_plot_and_output() ev <- withVisible(eval(expr, envir)) invokeRestart("muffleMessage") watcher$print_value(ev$value, ev$visible, envir)
doWithOneRestart(return(expr), restart) classes)) tryInvokeRestart("muffleWarning"))
}34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)}, warning = function (cnd) 47: watcher$capture_plot_and_output(){ watcher$print_value(ev$value, ev$visible, envir) if (getOption("warn") >= 2 || getOption("warn") < 0) {
cnd <- sanitize_call(cnd) watcher$push(cnd)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)
}28: process_group(group) switch(on_error, continue = invokeRestart("eval_continue"), 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()withVisible(eval(expr, envir))
29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd)
21: cnd <- sanitize_call(cnd)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))48: watcher$push(cnd) TRUE
40: evaluate::evaluate(...) stop = invokeRestart("eval_stop"), error = NULL)})
30: eval(call)withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
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) { switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) TRUE
error = function(e) {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:
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)
{ if (progress && is.function(pb$interrupt)) }, handlers) 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), 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 watcher$capture_plot_and_output()}, 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: pb$interrupt() if (on_message$capture) {}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)33: in_dir(input_dir(), expr) error = function(e) {27: if (is_R_CMD_build() || is_R_CMD_check())
doWithOneRestart(return(expr), restart)
30: eval(expr, envir)eval(call)
31: 40:
evaluate::evaluate(...)
watcher$push(cnd)43: } if (on_message$silence) { invokeRestart("muffleMessage") if (progress && is.function(pb$interrupt)) 41: error <<- format(e)
in_input_dir(evaluate(code, envir = env, new_device = FALSE, eval(call) pb$interrupt()34: if (is_R_CMD_build() || is_R_CMD_check()) }) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,
}28: withOneRestart(expr, restarts[[1L]])withVisible(eval(expr, envir))
29: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) keep_message = if (is.numeric(options$message)) TRUE else options$message, 32: }, warning = function (cnd) evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,
error <<- format(e)35:
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)
withRestartList(expr, restarts[-nr])49: keep_message = if (is.numeric(options$message)) TRUE else options$message, {with_handlers({{with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), if (getOption("warn") >= 2 || getOption("warn") < 0) {
stop_on_error = if (is.numeric(options$error)) options$error else {45: block_exec(params)
46: call_block(x)
47: process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 36: error = function(e) {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, return() if (progress && is.function(pb$interrupt)) }), list(rlang_trace_top_env = knit_global())), function(loc) { pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) stop_on_error = if (is.numeric(options$error)) options$error else { } watcher$capture_plot_and_output() watcher$capture_plot_and_output() for (expr in tle$exprs) {
error = function(e) { if (options$error && options$include) if (on_warning$capture) { if (options$error && options$include) if (on_message$capture) { 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)) 0L else 2L }, output_handler = knit_handlers(options$render, options))
if (progress && is.function(pb$interrupt)) cnd <- sanitize_call(cnd) 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) {50: setwd(wd)42: write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule())) pb$interrupt() watcher$push(cnd) pb$interrupt() ev <- withVisible(eval(expr, envir)) 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) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
51: process_file(text, output)
52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
53: in_dir(input_dir(), expr) if (is_R_CMD_build() || is_R_CMD_check()) invokeRestart("muffleWarning") }
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 } error <<- format(e) }) } TRUE}, handlers)
33:
49: }, error = function (cnd) }), list(rlang_trace_top_env = knit_global())), function(loc) { else 2L }, output_handler = knit_handlers(options$render, options))) setwd(wd)
write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule())){44: error = function(e) { if (on_warning$silence) {}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) watcher$capture_plot_and_output() if (progress && is.function(pb$interrupt)) invokeRestart("muffleWarning")rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
eng_r(options)
45: 51: cnd <- sanitize_call(cnd) }doWithOneRestart(return(expr), restart)block_exec(params) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) watcher$push(cnd) output_dir = getwd(), ...)
46: call_block(x)
}, error = function (cnd) 47: process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {process_file(text, output)with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), {
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
switch(on_error, continue = invokeRestart("eval_continue"),
52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
36: watcher$capture_plot_and_output()doWithOneRestart(return(expr), restart)54: error <<- format(e)53: }), list(rlang_trace_top_env = knit_global())), function(loc) { stop = invokeRestart("eval_stop"), error = NULL) if (progress && is.function(pb$interrupt))
cnd <- sanitize_call(cnd) error = function(e) { setwd(wd) if (progress && is.function(pb$interrupt)) rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 37: output_dir = getwd(), ...)
54: vweave_rmarkdown(...)
55: engine$weave(file, quiet = quiet, encoding = enc)vweave_rmarkdown(...)
55: watcher$push(cnd) 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: pb$interrupt()
engine$weave(file, quiet = quiet, encoding = enc) pb$interrupt() switch(on_error, continue = invokeRestart("eval_continue"), knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) if (is_R_CMD_build() || is_R_CMD_check()) 56: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) if (is_R_CMD_build() || is_R_CMD_check()) stop = invokeRestart("eval_stop"), error = NULL)
error <<- format(e)doTryCatch(return(expr), name, parentenv, handler)
})})53: }), list(rlang_trace_top_env = knit_global())) error <<- format(e)
38:
})56: withRestartList(expr, restarts)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 57:
output_dir = getwd(), ...)
54: tryCatchOne(expr, names, parentenv, handlers[[1L]])50: 49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 30: eval(call)
31: eval(call)
32: with_handlers({ for (expr in tle$exprs) { error = function(e) {doTryCatch(return(expr), name, parentenv, handler)vweave_rmarkdown(...)
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) }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: TRUE if (progress && is.function(pb$interrupt))
ev <- withVisible(eval(expr, envir))doTryCatch(return(expr), name, parentenv, handler)
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) pb$interrupt()55: watcher$capture_plot_and_output()
57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: tryCatchList(expr, classes, parentenv, handlers)
30:
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/RtmpiidpGf/file2704e75bc0e.rds")
An irrecoverable exception occurred. R is aborting now ...
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]])engine$weave(file, quiet = quiet, encoding = enc) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
33:
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) {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)
OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
if (is_R_CMD_build() || is_R_CMD_check())
59: 58: 60:
tryCatch({38: 40: tryCatchList(expr, classes, parentenv, handlers)tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", error <<- format(e)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) }), list(rlang_trace_top_env = knit_global()))evaluate::evaluate(...) TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file2704e75bc0e.rds")40:
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: 59: evaluate::evaluate(...)
tryCatch({ })
engine$weave(file, quiet = quiet, encoding = enc)in_input_dir(evaluate(code, envir = env, new_device = FALSE, setwd(startdir)50: engine$weave(file, quiet = quiet, encoding = enc)xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), An irrecoverable exception occurred. R is aborting now ...
error = function(e) { output <- find_vignette_product(name, by = "weave", engine = engine)41: if (progress && is.function(pb$interrupt))
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, setwd(startdir)49: pb$interrupt() keep_message = if (is.numeric(options$message)) TRUE else options$message, if (!have.makefile && vignette_is_tex(output)) { output <- find_vignette_product(name, by = "weave", engine = engine) if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) stop_on_error = if (is.numeric(options$error)) options$error else { 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/RtmpiidpGf/file2704e75bc0e.rds")
An irrecoverable exception occurred. R is aborting now ...
if (options$error && options$include) write_utf8(res, output %n% stdout())with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { paste0("\nQuitting from ", loc, if (!is.null(error)) if (progress && is.function(pb$interrupt)) texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { OK <<- FALSE pb$interrupt() 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: keep_message = if (is.numeric(options$message)) TRUE else options$message, paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
51: 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/RtmpiidpGf/file2704e75bc0e.rds")
An irrecoverable exception occurred. R is aborting now ...
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)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()) if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())) error <<- format(e)
59: })
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]])
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) }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/RtmpiidpGf/file2704e75bc0e.rds")
An irrecoverable exception occurred. R is aborting now ...
stop_on_error = if (is.numeric(options$error)) options$error else {
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())}, 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/RtmpiidpGf/file2704e75bc0e.rds")
An irrecoverable exception occurred. R is aborting now ...
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))) 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)})
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/RtmpiidpGf/file2704e75bc0e.rds")
An irrecoverable exception occurred. R is aborting now ...
47: process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) })
49: with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global()))
50: xfun:::handle_error(with_options(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) error <<- format(e) }), list(rlang_trace_top_env = knit_global())), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
51: process_file(text, output)
52: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
53: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
54: vweave_rmarkdown(...)
55: engine$weave(file, quiet = quiet, encoding = enc)
56: doTryCatch(return(expr), name, parentenv, handler)
57: tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: tryCatchList(expr, classes, parentenv, handlers)
59: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
60: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpiidpGf/file2704e75bc0e.rds")
An irrecoverable exception occurred. R is aborting now ...
Quitting from predict.Rmd:91-109 [unnamed-chunk-5]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `names(x) <- value`:
! 'names' attribute [3] must be the same length as the vector [0]
---
Backtrace:
▆
1. └─logitr::logitr(...)
2. └─logitr:::getMultistartSummary(allModels)
3. └─base::`colnames<-`(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'predict.Rmd' failed with diagnostics:
'names' attribute [3] must be the same length as the vector [0]
--- failed re-building ‘predict.Rmd’
--- re-building ‘summarizing_results.Rmd’ using rmarkdown
--- finished re-building ‘summarizing_results.Rmd’
--- re-building ‘utility_models.Rmd’ using rmarkdown
--- finished re-building ‘utility_models.Rmd’
SUMMARY: processing the following files failed:
‘basic_usage.Rmd’ ‘mnl_models.Rmd’ ‘mnl_models_weighted.Rmd’
‘predict.Rmd’
Error: Vignette re-building failed.
Execution halted
Flavor: r-release-macos-arm64