Last updated on 2025-11-24 01:48:41 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.3 | 4.94 | 150.00 | 154.94 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.3 | 3.98 | 112.32 | 116.30 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.3 | 34.00 | 206.07 | 240.07 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.3 | 22.00 | 250.11 | 272.11 | OK | |
| r-devel-windows-x86_64 | 1.1.2 | 11.00 | 207.00 | 218.00 | OK | |
| r-patched-linux-x86_64 | 1.1.3 | 5.75 | 143.54 | 149.29 | OK | |
| r-release-linux-x86_64 | 1.1.3 | 4.88 | 142.48 | 147.36 | OK | |
| r-release-macos-arm64 | 1.1.3 | 1.00 | 45.00 | 46.00 | ERROR | |
| r-release-macos-x86_64 | 1.1.3 | 5.00 | 178.00 | 183.00 | OK | |
| r-release-windows-x86_64 | 1.1.2 | 9.00 | 208.00 | 217.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.3 | 1.00 | 51.00 | 52.00 | OK | |
| r-oldrel-macos-x86_64 | 1.1.3 | 7.00 | 202.00 | 209.00 | OK | |
| r-oldrel-windows-x86_64 | 1.1.2 | 10.00 | 257.00 | 267.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'
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'
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'
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5)
An irrecoverable exception occurred. R is aborting now ...
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5)
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
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 ...
Error in names(x) <- value :
'names' attribute [3] must be the same length as the vector [0]
Calls: logitr -> getMultistartSummary -> colnames<-
Execution halted
Flavor: r-release-macos-arm64
Version: 1.1.3
Check: re-building of vignette outputs
Result: ERROR
Error(s) in re-building vignettes:
--- re-building ‘basic_usage.Rmd’ using rmarkdown
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
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"))) {
*** caught segfault ***
address 0x110, cause 'invalid permissions'
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, 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)
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
31: eval(call)
32: with_handlers({ 2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 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)
4: doTryCatch(return(expr), name, parentenv, handler)
5:
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])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)
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUEFUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: evaluate::evaluate(...)
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)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 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 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, } 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()) } 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) 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:
45: block_exec(params)
46: 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))call_block(x)
47: process_group(group)
29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output()
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)48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (on_message$capture) {
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) if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })}, error = function(e) {})
8: system.time({ model <- mi$model
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status } else { rlang::entrace(e) } } }), function(loc) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { setwd(wd) model$message <- result$message }})
9: 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)
50: process_file(text, output)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) 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()
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
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) } prefix <- paste("Error in", dcall, ": ")52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 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()) } TRUE}, handlers) 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)
output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
58: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)19:
*** caught segfault ***
address 0x110, cause 'invalid permissions'
parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))33: doWithOneRestart(return(expr), restart)
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
36: if (!have.makefile && vignette_is_tex(output)) {
doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts) texi2pdf(file = output, clean = FALSE, quiet = quiet)23: 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)))suppressMessages(suppressWarnings(parallel::mclapply(miList, })
59: 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/RtmpT6ACcL/file173092d59159.rds") runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26:
An irrecoverable exception occurred. R is aborting now ...
eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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) }
39: if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output()withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) 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: watcher$print_value(ev$value, ev$visible, envir) } TRUEeval(call)
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
40: evaluate::evaluate(...)
33: doWithOneRestart(return(expr), restart)
34: 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, withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: else 2L }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr)withRestartList(expr, restarts)
39:
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE keep_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)))}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: evaluate::evaluate(...)
44: eng_r(options)
45: block_exec(params)
46: call_block(x)
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) 47: process_group(group)
48: 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))
42: in_dir(input_dir(), expr)
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, })
49: stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0Lxfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { else 2L }, output_handler = knit_handlers(options$render, options)))
44: if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else {eng_r(options)
45: rlang::entrace(e) } } }), function(loc) { setwd(wd)block_exec(params)
46: call_block(x)
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)
47: process_group(group)50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52:
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49:
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) }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) output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54:
} 7: tryCatch({engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
}), function(loc) { setwd(wd) write_utf8(res, output %n% stdout())56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: process_file(text, output)
8:
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: system.time({ model <- mi$model result <- NULLvweave_rmarkdown(...)
54: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { })engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler) 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$message57: }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchList(expr, classes, parentenv, handlers)
58: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14:
if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine)56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
}}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173092d59159.rds")
57: tryCatchList(expr, classes, parentenv, handlers)
58: tryCatch({tryCatch(expr, error = function(e) {An irrecoverable exception occurred. R is aborting now ...
call <- conditionCall(e) if (!is.null(call)) { 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) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") output <- find_vignette_product(name, by = "texi2pdf", 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], }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173092d59159.rds") type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") }
An irrecoverable exception occurred. R is aborting now ...
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:
*** caught segfault ***
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, address 0x110, cause 'invalid permissions'
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, 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173092d59159.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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])
*** caught segfault ***
address 0x110, cause 'invalid permissions'
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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else {
Traceback:
rlang::entrace(e) } } }), function(loc) { 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
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)
50: 2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: 4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE 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) { message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173092d59159.rds")
An irrecoverable exception occurred. R is aborting now ...
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, 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)
*** caught segfault ***
address 0x110, cause 'invalid permissions'
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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))
*** caught segfault ***
address 0x110, cause 'invalid permissions'
})
59: 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/RtmpT6ACcL/file173092d59159.rds")
An irrecoverable exception occurred. R is aborting now ...
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173092d59159.rds")
An irrecoverable exception occurred. R is aborting now ...
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
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 }
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, 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) { 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) return() } watcher$capture_plot_and_output() if (on_warning$capture) { prefix <- paste("Error in", dcall, ": ") LONG <- 75L cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 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 (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() type = "b") if (w > LONG) watcher$print_value(ev$value, ev$visible, envir) } 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))}) TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
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: 36: doWithOneRestart(return(expr), restart)
37: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output()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(...)
if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage")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: }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() }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 watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options) }}, 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:
45: block_exec(params)doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
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)) 35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) }
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: else { rlang::entrace(e) }withRestartList(expr, restarts)
} })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 39: withRestarts(with_handlers({ for (expr in tle$exprs) { error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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) 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
0L else 2L }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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", 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 engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e))) else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: block_exec(params)})
59: 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/RtmpT6ACcL/file173092d59159.rds")
An irrecoverable exception occurred. R is aborting now ...
46: call_block(x)
47: process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173092d59159.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173092d59159.rds")
An irrecoverable exception occurred. R is aborting now ...
Quitting from basic_usage.Rmd:82-91 [unnamed-chunk-7]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `names(x) <- value`:
! 'names' attribute [3] must be the same length as the vector [0]
---
Backtrace:
▆
1. └─logitr::logitr(...)
2. └─logitr:::getMultistartSummary(allModels)
3. └─base::`colnames<-`(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'basic_usage.Rmd' failed with diagnostics:
'names' attribute [3] must be the same length as the vector [0]
--- failed re-building ‘basic_usage.Rmd’
--- re-building ‘benchmark.Rmd’ using rmarkdown
--- finished re-building ‘benchmark.Rmd’
--- re-building ‘convergence.Rmd’ using rmarkdown
--- finished re-building ‘convergence.Rmd’
--- re-building ‘data_formatting.Rmd’ using rmarkdown
--- finished re-building ‘data_formatting.Rmd’
--- re-building ‘interactions.Rmd’ using rmarkdown
--- finished re-building ‘interactions.Rmd’
--- re-building ‘mnl_models.Rmd’ using rmarkdown
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
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, 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)
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...) }
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6:
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)40: evaluate::evaluate(...)
}, error = function(e) {
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)})
2: mi = mi, opts = mi$options)eval_f(x0, ...)41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,
8:
system.time({ 3: 4: keep_message = if (is.numeric(options$message)) TRUE else options$message, model <- mi$modeldoTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) result <- NULL stop_on_error = if (is.numeric(options$error)) options$error else {
tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) 6: if (!is.null(result)) {tryCatchList(expr, classes, parentenv, handlers) model$fail <- FALSE
if (options$error && options$include) model$coefficients <- result$solution 7: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: tryCatch({
*** caught segfault ***
address 0x110, cause 'invalid permissions'
doTryCatch(return(expr), name, parentenv, handler) model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status 0L model$message <- result$message
} result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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) mi = mi, opts = mi$options)}, error = function(e) {}, error = function(e) {}) else 2L}) }, output_handler = knit_handlers(options$render, options))})
8: system.time({ model <- mi$model
result <- NULL 8: system.time({ tryCatch({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 42: mi = mi, opts = mi$options)in_dir(input_dir(), expr)
}, error = function(e) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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) mi = mi, opts = mi$options) 0L }, error = function(e) { else 2L
*** caught segfault ***
if (!is.null(result)) { }) model$fail <- FALSE
*** caught segfault ***
*** caught segfault ***
model$coefficients <- result$solutionaddress 0x110, cause 'invalid permissions'
}, output_handler = knit_handlers(options$render, options)))address 0x110, cause 'invalid permissions'
model$logLik <- as.numeric(-1 * result$objective) 9: if (!is.null(result)) {address 0x110, cause 'invalid permissions'
model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective)
model$iterations <- result$iterations model$iterations <- result$iterations model$status <- result$status model$status <- result$status model$message <- result$message44: }}) model$message <- result$message }FUN(X[[i]], ...)})eng_r(options)
9:
9: 10: FUN(X[[i]], ...)
lapply(X = S, FUN = FUN, ...)45: block_exec(params)10: FUN(X[[i]], ...)lapply(X = S, FUN = FUN, ...)
10:
Traceback:
1: 11:
46: call_block(x)11: doTryCatch(return(expr), name, parentenv, handler)
doTryCatch(return(expr), name, parentenv, handler)
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
47: process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
lapply(X = S, FUN = FUN, ...)
12: 2: tryCatchOne(expr, names, parentenv, handlers[[1L]])
*** caught segfault ***
error = function(e) {eval_f(x0, ...)12: if (progress && is.function(pb$interrupt))
11: address 0x110, cause 'invalid permissions'
pb$interrupt()doTryCatch(return(expr), name, parentenv, handler) 3: if (xfun::pkg_available("rlang", "1.0.0")) {nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
13: 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers) if (is_R_CMD_build() || is_R_CMD_check()) {tryCatchOne(expr, names, parentenv, handlers[[1L]])
cnd = tryCatch(rlang::entrace(e), error = identity)
error <<- format(cnd)14: 14: } else {tryCatch(expr, error = function(e) {
*** caught segfault ***
mi = mi, opts = mi$options) call <- conditionCall(e)13: address 0x110, cause 'invalid permissions'
Traceback:
1: rlang::entrace(e) if (!is.null(call)) {tryCatch(expr, error = function(e) {
Traceback:
}mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) if (identical(call[[1L]], quote(doTryCatch))) call <- conditionCall(e)tryCatchList(expr, classes, parentenv, handlers) 1:
Traceback:
if (!is.null(call)) { } if (identical(call[[1L]], quote(doTryCatch)))
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 1:
4: doTryCatch(return(expr), name, parentenv, handler)
})mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 5: 2: 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) { call <- sys.call(-4L) 2:
}) if (!is.null(result)) {14: dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")tryCatch(expr, error = function(e) { model$fail <- FALSE call <- sys.call(-4L) 2: dcall <- deparse(call, nlines = 1L)
eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, prefix <- paste("Error in", dcall, ": ")eval_f(x0, ...)eval_f(x0, ...) call <- conditionCall(e) LONG <- 75L
LONG <- 75L model$coefficients <- result$solution 3: mi = mi, opts = mi$options)nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
sm <- strsplit(conditionMessage(e), "\n")[[1L]] mi = mi, opts = mi$options) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") sm <- strsplit(conditionMessage(e), "\n")[[1L]] 3: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
Traceback:
49:
4: model$logLik <- as.numeric(-1 * result$objective) if (is.na(w)) 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) { if (is.na(w)) if (!is.null(call)) {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) {}) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)}) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
8: system.time({ model <- mi$model model$iterations <- result$iterationsxfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
Traceback:
model$status <- result$status if (progress && is.function(pb$interrupt)) result <- NULL
1: type = "b")mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
prefix <- paste("Error in", dcall, ": ") if (w > LONG) 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) 4: mi = mi, opts = mi$options) 1: prefix <- paste0(prefix, "\n ") model$message <- result$message } 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) pb$interrupt() .Internal(printDeferredWarnings()) }, error = function(e) {doTryCatch(return(expr), name, parentenv, handler) }) if (!is.null(result)) {
if (xfun::pkg_available("rlang", "1.0.0")) { } if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) 8:
})
9:
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) LONG <- 75L 5: } invisible(structure(msg, class = "try-error", condition = e))system.time({ model$fail <- FALSE 4: 19: parallel::mclapply(miList, runModel, mc.cores = numCores)
sm <- strsplit(conditionMessage(e), "\n")[[1L]]
20: } model$coefficients <- result$solution model <- mi$model}) model$logLik <- as.numeric(-1 * result$objective) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")tryCatchOne(expr, names, parentenv, handlers[[1L]]) result <- NULLFUN(X[[i]], ...)
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) { 2: model$iterations <- result$iterations
15: }) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
10: lapply(X = S, FUN = FUN, ...) }), function(loc) {
if (is.na(w)) withCallingHandlers(expr, warning = function(w) if (inherits(w, eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE) mi = mi, opts = mi$options) 8: doTryCatch(return(expr), name, parentenv, handler)11: 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))
}, 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"))) {system.time({ setwd(wd)doTryCatch(return(expr), name, parentenv, handler) cat(msg, file = outFile)
model$status <- result$status
16: write_utf8(res, output %n% stdout())
classes)) tryInvokeRestart("muffleWarning")) model <- mi$model 5: result <- NULLdoTryCatch(return(expr), name, parentenv, handler)
5: .Internal(printDeferredWarnings())sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))22:
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, 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) }
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: tryCatch({ invisible(structure(msg, class = "try-error", condition = e))tryCatchOne(expr, names, parentenv, handlers[[1L]])12:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) paste0("\nQuitting from ", loc, if (!is.null(error)) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, suppressMessages(suppressWarnings(parallel::mclapply(miList, }) 6: withCallingHandlers(expr, message = function(c) if (inherits(c, tryCatchOne(expr, names, parentenv, handlers[[1L]]) model$message <- result$message mi = mi, opts = mi$options) paste0("\n", rule(), error, "\n", rule()))
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)
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: tryCatchList(expr, classes, parentenv, handlers) classes)) tryInvokeRestart("muffleMessage")) 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, message = function (cnd) { watcher$capture_plot_and_output()
}, error = function(e) { })suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) }
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))
7: prefix <- paste("Error in", dcall, ": ") }})
9: FUN(X[[i]], ...)
10: 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))}) if (on_warning$silence) {lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
13:
if (on_message$capture) {29: tryCatch({tryCatchList(expr, classes, parentenv, handlers)}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)12: 22: watcher$push(cnd) if (!is.null(result)) {
withCallingHandlers(code, message = function (cnd) tryCatchOne(expr, names, parentenv, handlers[[1L]])15: } result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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]]) if (on_message$silence) {
withCallingHandlers(expr, message = function(c) if (inherits(c, 50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
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:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE) invokeRestart("muffleMessage") mi = mi, opts = mi$options)
{eval(expr, envir) model$fail <- FALSE }35: 13:
53: model$coefficients <- result$solution14: watcher$capture_plot_and_output()tryCatchList(expr, classes, parentenv, handlers)}, error = function(e) {16: model$logLik <- as.numeric(-1 * result$objective)tryCatch(expr, error = function(e) { if (on_message$capture) {
withRestartList(expr, restarts[-nr])sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) model$iterations <- result$iterations call <- conditionCall(e) watcher$push(cnd)}, warning = function (cnd)
model$status <- result$status{27: eval(expr, envir)
} if (!is.null(call)) { model$message <- result$message}) if (getOption("warn") >= 2 || getOption("warn") < 0) {14: vweave_rmarkdown(...)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, ": ")
28: return()withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage")
if (identical(call[[1L]], quote(doTryCatch))) 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", } if (on_message$silence) { invokeRestart("muffleMessage")36: } call <- sys.call(-4L)}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output()})
"brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)doWithOneRestart(return(expr), restart)
if (on_warning$capture) {26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(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: eval(call)
31: eval(call)
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]]) } if (on_message$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) } }}, warning = function (cnd) dcall <- deparse(call, nlines = 1L) } 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: 9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...) TRUE 8:
prefix <- paste("Error in", dcall, ": ")withOneRestart(expr, restarts[[1L]])54:
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)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)) LONG <- 75L
engine$weave(file, quiet = quiet, encoding = enc)35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: 35:
11: system.time({40: withRestartList(expr, restarts) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
37: doTryCatch(return(expr), name, parentenv, handler)evaluate::evaluate(...)55: withRestartList(expr, restarts[-nr])29: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") model <- mi$model
doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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) }
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) if (is.na(w)) {
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 }withCallingHandlers(code, message = function (cnd) }, error = function(e) { 0L w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], else 2L }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr)
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: block_exec(params)
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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } if (getOption("warn") >= 2 || getOption("warn") < 0) {})12: OK <<- FALSEwithOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) type = "b"){
tryCatchOne(expr, names, parentenv, handlers[[1L]]) return() else {39: 41: message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", if (w > LONG) } 9: watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd)
file, conditionMessage(e))) rlang::entrace(e) watcher$capture_plot_and_output() }evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,
}) }FUN(X[[i]], ...)38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) }
prefix <- paste0(prefix, "\n ") if (on_warning$silence) {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) })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)
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 } dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ") watcher$capture_plot_and_output() else prefix <- "Error : " invokeRestart("muffleWarning")10: 40:
59: 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } if (on_message$capture) { else 2L LONG <- 75L watcher$print_value(ev$value, ev$visible, envir)evaluate::evaluate(...) msg <- paste0(prefix, conditionMessage(e), "\n")lapply(X = S, FUN = FUN, ...)tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", } else { }, output_handler = knit_handlers(options$render, options)) .Internal(seterrmessage(msg[1L]))
sm <- strsplit(conditionMessage(e), "\n")[[1L]]}, error = function (cnd)
rlang::entrace(e) } if (!silent && isTRUE(getOption("show.error.messages"))) {11: watcher$push(cnd) TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file173097f981f7a.rds") 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, }{ 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)
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") stop_on_error = if (is.numeric(options$error)) options$error else { }
if (options$error && options$include) cat(msg, file = outFile) if (is.na(w)) An irrecoverable exception occurred. R is aborting now ...
}42: doTryCatch(return(expr), name, parentenv, handler) if (on_message$silence) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 0L33: in_dir(input_dir(), expr)
invokeRestart("muffleMessage") type = "b") .Internal(printDeferredWarnings()) 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)12: else 2L }), function(loc) {tryCatchOne(expr, names, parentenv, handlers[[1L]])doWithOneRestart(return(expr), restart) }
41:
13: }, output_handler = knit_handlers(options$render, options))43: invisible(structure(msg, class = "try-error", condition = e))
evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, tryCatchList(expr, classes, parentenv, handlers) setwd(wd)16: write_utf8(res, output %n% stdout())
keep_message = if (is.numeric(options$message)) TRUE else options$message, 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: 42: in_input_dir(evaluate(code, envir = env, new_device = FALSE, }) paste0("\nQuitting from ", loc, if (!is.null(error)) suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
in_dir(input_dir(), expr)
22: }14: tryCatch(expr, error = function(e) { keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, paste0("\n", rule(), error, "\n", rule()))
stop_on_error = if (is.numeric(options$error)) options$error else {43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
}, warning = function (cnd) keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { call <- conditionCall(e) keep_message = if (is.numeric(options$message)) TRUE else options$message, if (options$error && options$include) withCallingHandlers(expr, message = function(c) if (inherits(c, 34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
50: 0L if (!is.null(call)) {37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) classes)) tryInvokeRestart("muffleMessage")) if (options$error && options$include)
process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173097f981f7a.rds")
An irrecoverable exception occurred. R is aborting now ...
0L stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L
else 2L15: }, output_handler = knit_handlers(options$render, options))
}, output_handler = knit_handlers(options$render, options))) else 2L if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: block_exec(params)
46: call_block(x)
47: 23: 42:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE){ if (getOption("warn") >= 2 || getOption("warn") < 0) { return()
38: sm <- strsplit(conditionMessage(e), "\n")[[1L]]withRestartList(expr, restarts)suppressMessages(suppressWarnings(parallel::mclapply(miList, 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) 44: process_group(group)
}39: withRestarts(with_handlers({ runModel, mc.cores = numCores)))16:
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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else {24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", for (expr in tle$exprs) { prefix <- paste0(prefix, "\n ")in_dir(input_dir(), expr) "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) watcher$capture_plot_and_output()
ev <- withVisible(eval(expr, envir))48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt()
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(...) if (xfun::pkg_available("rlang", "1.0.0")) { if (on_warning$capture) { } cnd <- sanitize_call(cnd) if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), watcher$push(cnd)
rlang::entrace(e)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) error = function(e) {43: else prefix <- "Error : " }
41: } if (on_warning$silence) { msg <- paste0(prefix, conditionMessage(e), "\n")in_input_dir(evaluate(code, envir = env, new_device = FALSE, .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) }26: } invisible(structure(msg, class = "try-error", condition = e))})
15: invokeRestart("muffleWarning") if (progress && is.function(pb$interrupt)) 17: eval(expr, envir)
27: } }), function(loc) {evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, pb$interrupt()try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) keep_message = if (is.numeric(options$message)) TRUE else options$message,
eval(expr, envir)
28: withVisible(eval(expr, envir))
29: }, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), setwd(wd)FUN(X[[i]], ...) stop = invokeRestart("eval_stop"), error = NULL) stop_on_error = if (is.numeric(options$error)) options$error else { write_utf8(res, output %n% stdout())16: }) keep_message = if (is.numeric(options$message)) TRUE else options$message,
error <<- format(cnd) } stop_on_error = if (is.numeric(options$error)) options$error else { paste0("\nQuitting from ", loc, if (!is.null(error)) if (options$error && options$include) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
else { 0L18: withCallingHandlers(code, message = function (cnd) lapply(seq_len(cores), inner.do)
19: else 2L{ if (options$error && options$include)
rlang::entrace(e) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
44: 30: 17: FUN(X[[i]], ...)
18: parallel::mclapply(miList, runModel, mc.cores = numCores)
lapply(seq_len(cores), inner.do) } } }), function(loc) {eng_r(options) setwd(wd)
paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: 20:
45: block_exec(params)
withCallingHandlers(expr, warning = function(w) if (inherits(w, watcher$capture_plot_and_output() classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
}, output_handler = knit_handlers(options$render, options)) if (on_message$capture) {22: 19: parallel::mclapply(miList, runModel, mc.cores = numCores)
eval(call)
31: eval(call)
32: with_handlers({ for (expr in tle$exprs) {withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE46: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule())) runModel, mc.cores = numCores)))rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
output_dir = getwd(), ...)}, handlers)42: }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)call_block(x)
in_dir(input_dir(), expr)
24: 20: 33: 43: watcher$push(cnd)doWithOneRestart(return(expr), restart)
runMultistart(modelInputs)withCallingHandlers(expr, warning = function(w) if (inherits(w, 47:
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
25: }logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", classes)) tryInvokeRestart("muffleWarning"))
if (on_message$silence) { "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)
invokeRestart("muffleMessage")in_input_dir(evaluate(code, envir = env, new_device = FALSE, 34: 21: 26: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))withOneRestart(expr, restarts[[1L]])
process_group(group)eval(expr, envir)35:
50:
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))27: 55: 22: }process_file(text, output) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L
48: eval(expr, envir) }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
withCallingHandlers(expr, message = function(c) if (inherits(c, }, warning = function (cnd) watcher$capture_plot_and_output()
withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), { if (getOption("warn") >= 2 || getOption("warn") < 0) {28: 45: withVisible(eval(expr, envir))doTryCatch(return(expr), name, parentenv, handler)
classes)) tryInvokeRestart("muffleMessage")) error = function(e) {block_exec(params)
29: return()56:
if (progress && is.function(pb$interrupt)) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
51: withCallingHandlers(code, message = function (cnd) tryCatchOne(expr, names, parentenv, handlers[[1L]]) watcher$print_value(ev$value, ev$visible, envir)24: } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) }runMultistart(modelInputs) watcher$push(cnd) pb$interrupt() TRUEknitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
if (xfun::pkg_available("rlang", "1.0.0")) {46: call_block(x)
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
47: 57: tryCatchList(expr, classes, parentenv, handlers)
58:
if (is_R_CMD_build() || is_R_CMD_check()) {
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)))})
process_group(group)25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)
}52: {26:
48: cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: 40: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() watcher$capture_plot_and_output() if (on_warning$silence) {rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), if (on_message$capture) {evaluate::evaluate(...) if (xfun::pkg_available("rlang", "1.0.0")) {eval(expr, envir)
27: watcher$push(cnd)eval(expr, envir) invokeRestart("muffleWarning") output_dir = getwd(), ...)
if (is_R_CMD_build() || is_R_CMD_check()) {53: }59: 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/RtmpT6ACcL/file173097f981f7a.rds")
An irrecoverable exception occurred. R is aborting now ...
}
error = function(e) {}, error = function (cnd) 28: withVisible(eval(expr, envir)){ watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) if (progress && is.function(pb$interrupt)) 41: if (on_message$silence) {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)vweave_rmarkdown(...) invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() 0L if (on_warning$capture) { cnd = tryCatch(rlang::entrace(e), error = identity) cnd <- sanitize_call(cnd) watcher$push(cnd)
error <<- format(cnd) } pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
else 2L if (on_warning$silence) { }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr)
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, error = function(e) { invokeRestart("muffleWarning") setwd(wd) switch(on_error, continue = invokeRestart("eval_continue"), 29: 54: withCallingHandlers(code, message = function (cnd) write_utf8(res, output %n% stdout()) if (progress && is.function(pb$interrupt)) } paste0("\nQuitting from ", loc, if (!is.null(error)) keep_message = if (is.numeric(options$message)) TRUE else options$message, pb$interrupt()}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)}) stop_on_error = if (is.numeric(options$error)) options$error else {engine$weave(file, quiet = quiet, encoding = enc) stop = invokeRestart("eval_stop"), error = NULL)})
30: { paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) if (options$error && options$include)
watcher$capture_plot_and_output() if (xfun::pkg_available("rlang", "1.0.0")) {eval(call)30:
if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity)55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
58: error <<- format(cnd)eval(call) if (on_message$capture) { 0LtryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)
31: eval(call)
32: with_handlers({ watcher$push(cnd) else 2L } 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) { }, output_handler = knit_handlers(options$render, options)))
for (expr in tle$exprs) { } else { rlang::entrace(e)52: if (!have.makefile && vignette_is_tex(output)) { ev <- withVisible(eval(expr, envir)) } texi2pdf(file = output, clean = FALSE, quiet = quiet) cnd <- sanitize_call(cnd) output <- find_vignette_product(name, by = "texi2pdf", engine = engine)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) watcher$capture_plot_and_output() watcher$push(cnd)
rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) }), function(loc) { watcher$print_value(ev$value, ev$visible, envir) output_dir = getwd(), ...)
}
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)
50: process_file(text, output)
51: switch(on_error, continue = invokeRestart("eval_continue"), }}, error = function(e) {44: 53: eng_r(options) stop = invokeRestart("eval_stop"), error = NULL) OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 33: TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)doWithOneRestart(return(expr), restart)
vweave_rmarkdown(...)34: })knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr]) file, conditionMessage(e)))
})
34: withOneRestart(expr, restarts[[1L]])
35: 30: 36: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
37: 45: 54:
eval(call)block_exec(params)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) }59: 52:
46: TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)call_block(x)withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
39: 31: eval(call)
32:
rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), with_handlers({47: 40:
tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", process_group(group)evaluate::evaluate(...)
TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file173097f981f7a.rds") output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
An irrecoverable exception occurred. R is aborting now ...
withRestarts(with_handlers({57: 41: 48: for (expr in tle$exprs) { for (expr in tle$exprs) {tryCatchList(expr, classes, parentenv, handlers) ev <- withVisible(eval(expr, envir))evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
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) withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 56: 58: error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) 0LtryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)
33: else 2L ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUEdoWithOneRestart(return(expr), restart)tryCatchOne(expr, names, parentenv, handlers[[1L]]) output <- find_vignette_product(name, by = "weave", engine = engine) error <<- format(cnd) }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr)
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
34: withOneRestart(expr, restarts[[1L]])57:
tryCatchList(expr, classes, parentenv, handlers)
if (!have.makefile && vignette_is_tex(output)) {
40: evaluate::evaluate(...) texi2pdf(file = output, clean = FALSE, quiet = quiet)35: 58:
43: }withRestartList(expr, restarts[-nr]) else { output <- find_vignette_product(name, by = "texi2pdf", in_input_dir(evaluate(code, envir = env, new_device = FALSE, rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 41: keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message,
evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, error = function(e) { engine = engine) }}, 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 {tryCatch({36: if (options$error && options$include) OK <<- FALSE if (progress && is.function(pb$interrupt)) stop_on_error = if (is.numeric(options$error)) options$error else { pb$interrupt()doWithOneRestart(return(expr), restart) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", engine$weave(file, quiet = quiet, encoding = enc) file, conditionMessage(e))) setwd(startdir) if (xfun::pkg_available("rlang", "1.0.0")) { 0L else 2L if (options$error && options$include) 0L}) if (is_R_CMD_build() || is_R_CMD_check()) { output <- find_vignette_product(name, by = "weave", engine = engine) }, output_handler = knit_handlers(options$render, options)))
else 2L44: cnd = tryCatch(rlang::entrace(e), error = identity)
eng_r(options) if (!have.makefile && vignette_is_tex(output)) {37: }, output_handler = knit_handlers(options$render, options))
withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) error <<- format(cnd) texi2pdf(file = output, clean = FALSE, quiet = quiet)
38: withRestartList(expr, restarts)
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) }59: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 0L39: 45: TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file173097f981f7a.rds") output <- find_vignette_product(name, by = "texi2pdf", block_exec(params)
else 2L else { engine = engine) }, output_handler = knit_handlers(options$render, options)))An irrecoverable exception occurred. R is aborting now ...
rlang::entrace(e) }withRestarts(with_handlers({ }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 44: eng_r(options) TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file173097f981f7a.rds") } }), function(loc) {
46: call_block(x)
47: process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
for (expr in tle$exprs) {45: 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
block_exec(params)An irrecoverable exception occurred. R is aborting now ...
ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()46: watcher$print_value(ev$value, ev$visible, envir) } error = function(e) {call_block(x) TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: evaluate::evaluate(...)
53: vweave_rmarkdown(...) if (progress && is.function(pb$interrupt))
pb$interrupt()47: if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) }41:
54: engine$weave(file, quiet = quiet, encoding = enc) else { rlang::entrace(e)process_group(group)
55: doTryCatch(return(expr), name, parentenv, handler)
48: } } })evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,
keep_message = if (is.numeric(options$message)) TRUE else options$message, withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 49: error = function(e) {xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), if (progress && is.function(pb$interrupt)) error = function(e) { if (progress && is.function(pb$interrupt)) 56: pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { stop_on_error = if (is.numeric(options$error)) options$error else { pb$interrupt() if (is_R_CMD_build() || is_R_CMD_check()) { if (xfun::pkg_available("rlang", "1.0.0")) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (options$error && options$include) cnd = tryCatch(rlang::entrace(e), error = identity) 0L if (is_R_CMD_build() || is_R_CMD_check()) {
cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) error <<- format(cnd) else 2L }, output_handler = knit_handlers(options$render, options)) } } else { rlang::entrace(e) } } }), function(loc) { else { setwd(wd)
57: 42: write_utf8(res, output %n% stdout()) rlang::entrace(e) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))tryCatchList(expr, classes, parentenv, handlers)}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: process_file(text, output)
51:
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)knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
})45: block_exec(params)58:
46: tryCatch({52: call_block(x)
rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 47: output_dir = getwd(), ...)
process_group(group) engine$weave(file, quiet = quiet, encoding = enc)49: 53: setwd(startdir)vweave_rmarkdown(...)xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
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", error = function(e) {54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173097f981f7a.rds")
An irrecoverable exception occurred. R is aborting now ...
engine = engine)
if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { }}, error = function(e) { 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()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) {48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) setwd(wd) write_utf8(res, output %n% stdout())59: paste0("\nQuitting from ", loc, if (!is.null(error)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: 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/RtmpT6ACcL/file173097f981f7a.rds")
rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), An irrecoverable exception occurred. R is aborting now ...
error <<- format(cnd) } else { rlang::entrace(e) } } output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
})
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
58: error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else {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) } rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: process_file(text, output)
59: 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/RtmpT6ACcL/file173097f981f7a.rds")
An irrecoverable exception occurred. R is aborting now ...
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173097f981f7a.rds")
An irrecoverable exception occurred. R is aborting now ...
Quitting from mnl_models.Rmd:85-98 [unnamed-chunk-9]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `names(x) <- value`:
! 'names' attribute [3] must be the same length as the vector [0]
---
Backtrace:
▆
1. └─logitr::logitr(...)
2. └─logitr:::getMultistartSummary(allModels)
3. └─base::`colnames<-`(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'mnl_models.Rmd' failed with diagnostics:
'names' attribute [3] must be the same length as the vector [0]
--- failed re-building ‘mnl_models.Rmd’
--- re-building ‘mnl_models_weighted.Rmd’ using rmarkdown
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** 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"))
*** caught segfault ***
address 0x110, cause 'invalid permissions'
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
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, 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173097db7d5cf.rds")
An irrecoverable exception occurred. R is aborting now ...
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
Traceback:
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:
Traceback:
1: eval_f(x0, ...)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: 2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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: 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)FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
*** caught segfault ***
mi = mi, opts = mi$options)
4: 7:
address 0x110, cause 'invalid permissions'
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 <- 75LtryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
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], 8:
Traceback:
type = "b")system.time({ if (w > LONG) 1: doTryCatch(return(expr), name, parentenv, handler) prefix <- paste0(prefix, "\n ")mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) model <- mi$model
result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
} else prefix <- "Error : " 2: mi = mi, opts = mi$options) }, error = function(e) { msg <- paste0(prefix, conditionMessage(e), "\n") })eval_f(x0, ...) .Internal(seterrmessage(msg[1L])) if (!is.null(result)) { model$fail <- FALSE
if (!silent && isTRUE(getOption("show.error.messages"))) { 3: 5: cat(msg, file = outFile) .Internal(printDeferredWarnings())nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) model$coefficients <- result$solution } model$logLik <- as.numeric(-1 * result$objective) invisible(structure(msg, class = "try-error", condition = e)) model$iterations <- result$iterations
})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
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) {}) model$status <- result$status model$message <- result$message }})
tryCatchOne(expr, names, parentenv, handlers[[1L]])17: FUN(X[[i]], ...)
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 9: model$coefficients <- result$solutionFUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
18: 6: model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$messagetryCatchList(expr, classes, parentenv, handlers) }11: })
9: FUN(X[[i]], ...)
10:
7: lapply(seq_len(cores), inner.do)
19: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)parallel::mclapply(miList, runModel, mc.cores = numCores)
lapply(X = S, FUN = FUN, ...)}, error = function(e) {})
8: system.time({ model <- mi$modeldoTryCatch(return(expr), name, parentenv, handler) result <- NULL
11: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
Traceback:
1:
13: 20: 12: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) mi = mi, opts = mi$options)tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchList(expr, classes, parentenv, handlers)
}, error = function(e) {13: })withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
2: 14: eval_f(x0, ...)tryCatch(expr, error = function(e) { if (!is.null(result)) {tryCatchList(expr, classes, parentenv, handlers) call <- conditionCall(e) model$fail <- FALSE21: model$coefficients <- result$solution
if (!is.null(call)) { 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations14: model$status <- result$status model$message <- result$message mi = mi, opts = mi$options) }})tryCatch(expr, error = function(e) {
call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) 9:
4: doTryCatch(return(expr), name, parentenv, handler)suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
FUN(X[[i]], ...)
5:
if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L22: 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], 10: dcall <- deparse(call, nlines = 1L) type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ")tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: lapply(X = S, FUN = FUN, ...)withCallingHandlers(expr, message = function(c) if (inherits(c, } classes)) tryInvokeRestart("muffleMessage")) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")tryCatchList(expr, classes, parentenv, handlers) .Internal(seterrmessage(msg[1L]))
7: tryCatch({
11: 23: if (!silent && isTRUE(getOption("show.error.messages"))) {doTryCatch(return(expr), name, parentenv, handler)
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, cat(msg, file = outFile) mi = mi, opts = mi$options)}, error = function(e) {suppressMessages(suppressWarnings(parallel::mclapply(miList, })
8: 12: system.time({ .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
runModel, mc.cores = numCores)))16:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))24: model <- mi$modelrunMultistart(modelInputs) result <- NULL
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"), prefix <- paste("Error in", dcall, ": ")
scalePar = "price", robust = TRUE, numMultiStarts = 10) LONG <- 75L 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)) {17: FUN(X[[i]], ...)
sm <- strsplit(conditionMessage(e), "\n")[[1L]] model$fail <- FALSE
18: lapply(seq_len(cores), inner.do)
19: 26: eval(expr, envir) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: parallel::mclapply(miList, runModel, mc.cores = numCores) if (is.na(w)) model$coefficients <- result$solution
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
model$logLik <- as.numeric(-1 * result$objective)27: model$iterations <- result$iterations w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") model$status <- result$status model$message <- result$message }eval(expr, envir)})
tryCatchList(expr, classes, parentenv, handlers)28: 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, withVisible(eval(expr, envir)) classes)) tryInvokeRestart("muffleMessage"))
9: 29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output()14: if (w > LONG) prefix <- paste0(prefix, "\n ") }tryCatch(expr, error = function(e) {FUN(X[[i]], ...)
10: call <- conditionCall(e)
*** caught segfault ***
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, else prefix <- "Error : " runModel, mc.cores = numCores))) if (!is.null(call)) {address 0x110, cause 'invalid permissions'
if (identical(call[[1L]], quote(doTryCatch))) if (on_message$capture) { msg <- paste0(prefix, conditionMessage(e), "\n") watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) lapply(X = S, FUN = FUN, ...) .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)
11: doTryCatch(return(expr), name, parentenv, handler){
*** caught segfault ***
call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")16:
address 0x110, cause 'invalid permissions'
12: LONG <- 75L24: tryCatchOne(expr, names, parentenv, handlers[[1L]]) sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (getOption("warn") >= 2 || getOption("warn") < 0) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
runMultistart(modelInputs)17: FUN(X[[i]], ...)
13: tryCatchList(expr, classes, parentenv, handlers)25: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
return() }logitr(data = cars_us, outcome = "choice", obsID = "obsnum", watcher$capture_plot_and_output()
pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", if (is.na(w)) "bev150", "american", "japanese", "chinese", "skorean", 14: "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10)
26: eval(expr, envir) if (on_warning$capture) {tryCatch(expr, error = function(e) { call <- conditionCall(e)
18: if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)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")27: cnd <- sanitize_call(cnd)19: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], parallel::mclapply(miList, runModel, mc.cores = numCores) watcher$push(cnd)
20: eval(expr, envir) } if (on_warning$silence) {withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) type = "b") if (w > LONG) if (is.na(w))
invokeRestart("muffleWarning")28: withVisible(eval(expr, envir))
29: prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")withCallingHandlers(code, message = function (cnd) 21: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], {suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) .Internal(seterrmessage(msg[1L])) watcher$capture_plot_and_output() } if (!silent && isTRUE(getOption("show.error.messages"))) {}, error = function (cnd) cat(msg, file = outFile) if (on_message$capture) { type = "b") watcher$push(cnd) if (w > LONG) }{ .Internal(printDeferredWarnings()) prefix <- paste0(prefix, "\n ") if (on_message$silence) { } } watcher$capture_plot_and_output() cnd <- sanitize_call(cnd)
*** caught segfault ***
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
address 0x110, cause 'invalid permissions'
watcher$push(cnd)
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
invokeRestart("muffleMessage") } switch(on_error, continue = invokeRestart("eval_continue"), else prefix <- "Error : " stop = invokeRestart("eval_stop"), error = NULL) 2: }, warning = function (cnd) invisible(structure(msg, class = "try-error", condition = e))}){}) if (getOption("warn") >= 2 || getOption("warn") < 0) {
30:
Traceback:
eval_f(x0, ...)
eval(call) msg <- paste0(prefix, conditionMessage(e), "\n")15: 23: return()try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: suppressMessages(suppressWarnings(parallel::mclapply(miList, .Internal(seterrmessage(msg[1L]))
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) runModel, mc.cores = numCores))) if (!silent && isTRUE(getOption("show.error.messages"))) { 1:
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)24: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
cat(msg, file = outFile)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)
*** caught segfault ***
}
watcher$capture_plot_and_output() if (on_warning$capture) {
address 0x110, cause 'invalid permissions'
3: 17: .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16:
FUN(X[[i]], ...) cnd <- sanitize_call(cnd) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
26: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6:
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 19: watcher$push(cnd)33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: mi = mi, opts = mi$options)withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
37: parallel::mclapply(miList, runModel, mc.cores = numCores)tryCatchList(expr, classes, parentenv, handlers) }
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20:
6:
Traceback:
38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))eval(expr, envir) watcher$capture_plot_and_output() 1: tryCatchList(expr, classes, parentenv, handlers) if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) {withCallingHandlers(expr, warning = function(w) if (inherits(w, mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) watcher$capture_plot_and_output()
7: tryCatch({
watcher$print_value(ev$value, ev$visible, envir)
27: }
7: classes)) tryInvokeRestart("muffleWarning")) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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, cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL) mi = mi, opts = mi$options)eval(expr, envir) 2: 20: tryCatch({
}, error = function(e) {})
8:
Traceback:
keep_message = if (is.numeric(options$message)) TRUE else options$message, 21: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }) 1: system.time({suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: mi = mi, opts = mi$options)withCallingHandlers(expr, warning = function(w) if (inherits(w, eval_f(x0, ...) 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()mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...) model <- mi$model
withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: }, error = function(e) {28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) if (xfun::pkg_available("rlang", "1.0.0")) {30: result <- NULL 3: {eval(call) if (is_R_CMD_build() || is_R_CMD_check()) {runMultistart(modelInputs)})
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)) { 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))) classes)) tryInvokeRestart("muffleWarning")) cnd = tryCatch(rlang::entrace(e), error = identity)
31: eval(call)
32:
watcher$capture_plot_and_output() error <<- format(cnd)25: }) if (!is.null(result)) { model$fail <- FALSEnloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)
}
model$coefficients <- result$solution else { model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterationslogitr(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) 3: 21: rlang::entrace(e) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")with_handlers({ if (on_message$capture) {
} 4: 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, message = function (cnd) if (w > LONG) watcher$push(cnd) } } })
49: if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() prefix <- paste0(prefix, "\n ") model$status <- result$status27: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)eval(expr, envir) } if (on_warning$capture) { 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)
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, doTryCatch(return(expr), name, parentenv, handler)
else prefix <- "Error : " cnd <- sanitize_call(cnd)33: 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"), mi = mi, opts = mi$options){28: withVisible(eval(expr, envir))
doWithOneRestart(return(expr), restart)
stop = invokeRestart("eval_stop"), error = NULL) msg <- paste0(prefix, conditionMessage(e), "\n") watcher$capture_plot_and_output() .Internal(seterrmessage(msg[1L])) if (on_message$capture) { watcher$push(cnd)
model$message <- result$message50: process_file(text, output)
} if (!silent && isTRUE(getOption("show.error.messages"))) {34: if (on_message$silence) { }})
51: cat(msg, file = outFile)knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
29: }) invokeRestart("muffleMessage")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)withOneRestart(expr, restarts[[1L]])
5: 4:
.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:
34: withOneRestart(expr, restarts[[1L]])
35:
9: FUN(X[[i]], ...)withCallingHandlers(code, message = function (cnd) withCallingHandlers(expr, message = function(c) if (inherits(c, {35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38:
tryCatchOne(expr, names, parentenv, handlers[[1L]])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)
6: tryCatchList(expr, classes, parentenv, handlers)43: withRestartList(expr, restarts) classes)) tryInvokeRestart("muffleMessage"))10: watcher$capture_plot_and_output()doTryCatch(return(expr), name, parentenv, handler)
lapply(X = S, FUN = FUN, ...)39:
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) 7: tryCatch({23:
52: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {withRestarts(with_handlers({11: watcher$push(cnd) }doTryCatch(return(expr), name, parentenv, handler) }}, 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)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
if (on_warning$silence) {})12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13:
tryCatchList(expr, classes, parentenv, handlers)suppressMessages(suppressWarnings(parallel::mclapply(miList, } output_dir = getwd(), ...)
14: 7: invokeRestart("muffleWarning") } TRUE 8: }, handlers)}, error = function (cnd) tryCatch(expr, error = function(e) { call <- conditionCall(e)
in_input_dir(evaluate(code, envir = env, new_device = FALSE, for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output(){33: watcher$print_value(ev$value, ev$visible, envir)
watcher$capture_plot_and_output()doWithOneRestart(return(expr), restart) if (!is.null(call)) {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({ if (identical(call[[1L]], quote(doTryCatch))) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, cnd <- sanitize_call(cnd) keep_message = if (is.numeric(options$message)) TRUE else options$message, watcher$push(cnd)system.time({53: model <- mi$model result <- NULL tryCatch({ runModel, mc.cores = numCores))) switch(on_error, continue = invokeRestart("eval_continue"),
} stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L call <- sys.call(-4L)
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc) stop = invokeRestart("eval_stop"), error = NULL) }, output_handler = knit_handlers(options$render, options))) mi = mi, opts = mi$options) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 34:
dcall <- deparse(call, nlines = 1L) }, error = function(e) { }) if (!is.null(result)) {44: TRUE prefix <- paste("Error in", dcall, ": ")withOneRestart(expr, restarts[[1L]])
model$fail <- FALSE55: LONG <- 75L
eng_r(options) mi = mi, opts = mi$options) }, error = function(e) { model$coefficients <- result$solutiondoTryCatch(return(expr), name, parentenv, handler)
56: }) }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution
sm <- strsplit(conditionMessage(e), "\n")[[1L]] model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations
model$logLik <- as.numeric(-1 * result$objective)tryCatchOne(expr, names, parentenv, handlers[[1L]])
45: 57: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")eval(expr, envir)block_exec(params) 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)tryCatchList(expr, classes, parentenv, handlers)
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)35: 28: withVisible(eval(expr, envir))
29: 46: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd)58: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: .Internal(printDeferredWarnings())30:
model$iterations <- result$iterations40: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)eval(call)call_block(x) } } 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)})
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: output <- find_vignette_product(name, by = "weave", engine = engine)
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)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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet)31: FUN(X[[i]], ...)
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 { 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)))})
59: 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/RtmpT6ACcL/file173097db7d5cf.rds")
An irrecoverable exception occurred. R is aborting now ...
if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")30: if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ")
eval(call)
eval(call)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) {
31: else prefix <- "Error : " if (progress && is.function(pb$interrupt)) cnd = tryCatch(rlang::entrace(e), error = identity)
32: with_handlers({withRestartList(expr, restarts)eval(call)10:
lapply(X = S, FUN = FUN, ...)18: error <<- format(cnd)
pb$interrupt() }39:
11: doTryCatch(return(expr), name, parentenv, handler)
12: else { msg <- paste0(prefix, conditionMessage(e), "\n")32: rlang::entrace(e)with_handlers({ if (xfun::pkg_available("rlang", "1.0.0")) { for (expr in tle$exprs) { .Internal(seterrmessage(msg[1L]))lapply(seq_len(cores), inner.do) if (is_R_CMD_build() || is_R_CMD_check()) { for (expr in tle$exprs) { } } })
withRestarts(with_handlers({tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: cnd = tryCatch(rlang::entrace(e), error = identity) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
33: doWithOneRestart(return(expr), restart) if (!silent && isTRUE(getOption("show.error.messages"))) {
49: for (expr in tle$exprs) {
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])tryCatchList(expr, classes, parentenv, handlers) error <<- format(cnd) cat(msg, file = outFile) ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) }
}
19: .Internal(printDeferredWarnings()) TRUE else {14: }tryCatch(expr, error = function(e) {xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity)}, handlers)parallel::mclapply(miList, runModel, mc.cores = numCores) invisible(structure(msg, class = "try-error", condition = e))36: call <- conditionCall(e) 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(...)
})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
rlang::entrace(e) error <<- format(cnd) }
41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (!is.null(call)) {33: doWithOneRestart(return(expr), restart) keep_message = if (is.numeric(options$message)) TRUE else options$message,
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do) stop_on_error = if (is.numeric(options$error)) options$error else { }doWithOneRestart(return(expr), restart) if (options$error && options$include) 20: 34: else { rlang::entrace(e) } } }), function(loc) { }withCallingHandlers(expr, warning = function(w) if (inherits(w,
withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
classes)) tryInvokeRestart("muffleWarning"))36: }) 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52:
rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 19:
0L21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: 37:
doWithOneRestart(return(expr), restart)parallel::mclapply(miList, runModel, mc.cores = numCores) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L 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:
else 2L output_dir = getwd(), ...)suppressMessages(suppressWarnings(parallel::mclapply(miList, 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, 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: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ runModel, mc.cores = numCores)))20: eval(call) for (expr in tle$exprs) {49: for (expr in tle$exprs) { }, output_handler = knit_handlers(options$render, options))
53: vweave_rmarkdown(...)
ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)withCallingHandlers(expr, warning = function(w) if (inherits(w, xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
32: error = function(e) {
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"), 54: with_handlers({42: classes)) tryInvokeRestart("muffleWarning")) ev <- withVisible(eval(expr, envir)) } if (progress && is.function(pb$interrupt)) scalePar = "price", robust = TRUE, numMultiStarts = 10) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE
26: in_dir(input_dir(), expr) TRUE pb$interrupt()engine$weave(file, quiet = quiet, encoding = enc) if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) for (expr in tle$exprs) {
eval(expr, envir)}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) ev <- withVisible(eval(expr, envir))
paste0("\n", rule(), error, "\n", rule()))
}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
watcher$capture_plot_and_output(){
40:
evaluate::evaluate(...) watcher$capture_plot_and_output()
43: 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, 55: 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 { stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr)
43: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (options$error && options$include) 0L if (on_message$capture) {55:
57: tryCatchList(expr, classes, parentenv, handlers)
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)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)))
}40: doTryCatch(return(expr), name, parentenv, handler) else 2L21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
44: eng_r(options)
}, output_handler = knit_handlers(options$render, options)))evaluate::evaluate(...) watcher$print_value(ev$value, ev$visible, envir) watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd)
} TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)
44: 45: 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", block_exec(params)eng_r(options)
41: 34: 56:
withOneRestart(expr, restarts[[1L]])}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
{46:
evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, tryCatchOne(expr, names, parentenv, handlers[[1L]])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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output) file, conditionMessage(e)))})
59: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100",
keep_message = if (is.numeric(options$message)) TRUE else options$message,
"bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10)
if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) }45: TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file173097db7d5cf.rds")57: 51: 35: stop_on_error = if (is.numeric(options$error)) options$error else {withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))
tryCatchList(expr, classes, parentenv, handlers) if (on_warning$silence) {42:
invokeRestart("muffleWarning") }block_exec(params)
46: call_block(x)
47: process_group(group)
}, error = function (cnd) An irrecoverable exception occurred. R is aborting now ...
48: 58: 38: {withRestartList(expr, restarts)
39: withRestarts(with_handlers({withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { for (expr in tle$exprs) {knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) if (progress && is.function(pb$interrupt)) in_dir(input_dir(), expr)
26: 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)
ev <- withVisible(eval(expr, envir))tryCatch({ watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd)eval(expr, envir) switch(on_error, continue = invokeRestart("eval_continue"), 52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
watcher$capture_plot_and_output()
27: eval(expr, envir) pb$interrupt() stop = invokeRestart("eval_stop"), error = NULL)})55: watcher$print_value(ev$value, ev$visible, envir)doTryCatch(return(expr), name, parentenv, handler)45:
block_exec(params)
46:
28: withVisible(eval(expr, envir)) } if (xfun::pkg_available("rlang", "1.0.0")) {
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
58: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) if (is_R_CMD_build() || is_R_CMD_check()) { if (!have.makefile && vignette_is_tex(output)) { TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: evaluate::evaluate(...)
41: cnd = tryCatch(rlang::entrace(e), error = identity) engine$weave(file, quiet = quiet, encoding = enc)29: texi2pdf(file = output, clean = FALSE, quiet = quiet)evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 30: error <<- format(cnd) keep_message = if (is.numeric(options$message)) TRUE else options$message, withCallingHandlers(code, message = function (cnd) setwd(startdir) stop_on_error = if (is.numeric(options$error)) options$error else {call_block(x) if (options$error && options$include) 0L } output <- find_vignette_product(name, by = "weave", engine = engine) else 2L if (!have.makefile && vignette_is_tex(output)) { }, output_handler = knit_handlers(options$render, options)){
output <- find_vignette_product(name, by = "texi2pdf", eval(call)
42: in_dir(input_dir(), expr)
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L watcher$capture_plot_and_output() else {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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd)31: else 2L } if (on_message$capture) {eval(call) }, output_handler = knit_handlers(options$render, options))) watcher$push(cnd) else { rlang::entrace(e) } } texi2pdf(file = output, clean = FALSE, quiet = quiet)
44: eng_r(options)
45: block_exec(params) }
32: with_handlers({ for (expr in tle$exprs) { engine = engine) 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)))})
59: if (on_message$silence) { ev <- withVisible(eval(expr, envir)) } }) rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE
invokeRestart("muffleMessage")}, handlers)
33: }, error = function(e) { TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file173097db7d5cf.rds")
error = function(e) {49: An irrecoverable exception occurred. R is aborting now ...
46: doWithOneRestart(return(expr), restart)xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), if (progress && is.function(pb$interrupt)) pb$interrupt() } if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { error = function(e) { OK <<- FALSE}, warning = function (cnd) call_block(x) cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e)
34: if (progress && is.function(pb$interrupt)) } } }), function(loc) { setwd(wd){ if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() write_utf8(res, output %n% stdout()) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", pb$interrupt()withOneRestart(expr, restarts[[1L]]) if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) if (on_warning$capture) { file, conditionMessage(e))) error <<- format(cnd) }})
cnd <- sanitize_call(cnd)59: else {
47: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", 35: watcher$push(cnd) TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file173097db7d5cf.rds")withRestartList(expr, restarts[-nr])process_group(group)
rlang::entrace(e) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: 36: process_file(text, output) } if (on_warning$silence) { invokeRestart("muffleWarning")
} }doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
39: } }), function(loc) { setwd(wd)}, error = function (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)48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 51:
withRestarts(with_handlers({An irrecoverable exception occurred. R is aborting now ...
for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) error = function(e) { watcher$capture_plot_and_output()knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) if (progress && is.function(pb$interrupt)) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity)
error <<- format(cnd)
40: evaluate::evaluate(...)50: }{52:
watcher$capture_plot_and_output() else {rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 41: rlang::entrace(e)evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, process_file(text, output) } cnd <- sanitize_call(cnd)
watcher$push(cnd) } keep_message = if (is.numeric(options$message)) TRUE else options$message, }) switch(on_error, continue = invokeRestart("eval_continue"),
stop = invokeRestart("eval_stop"), error = NULL)}) output_dir = getwd(), ...)51:
49: stop_on_error = if (is.numeric(options$error)) options$error else {53: vweave_rmarkdown(...)xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) if (options$error && options$include) 30: 54: engine$weave(file, quiet = quiet, encoding = enc)
error <<- format(cnd)
eval(call)52:
0Lrmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 31: } else 2L else { }, output_handler = knit_handlers(options$render, options)) output_dir = getwd(), ...) rlang::entrace(e)
} } }), function(loc) {42: eval(call)55: 53: doTryCatch(return(expr), name, parentenv, handler)
in_dir(input_dir(), expr)32:
setwd(wd)vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])43: with_handlers({in_input_dir(evaluate(code, envir = env, new_device = FALSE, 56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, write_utf8(res, output %n% stdout())
paste0("\nQuitting from ", loc, if (!is.null(error)) 57: 57: tryCatchList(expr, classes, parentenv, handlers) for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
keep_message = if (is.numeric(options$message)) TRUE else options$message, tryCatchList(expr, classes, parentenv, handlers)
58:
33: paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: 58: doWithOneRestart(return(expr), restart)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), tryCatch({tryCatch({ output_dir = getwd(), ...) engine$weave(file, quiet = quiet, encoding = enc)
setwd(startdir)53: stop_on_error = if (is.numeric(options$error)) options$error else { engine$weave(file, quiet = quiet, encoding = enc)34: if (options$error && options$include) 0Lvweave_rmarkdown(...) output <- find_vignette_product(name, by = "weave", engine = engine)withOneRestart(expr, restarts[[1L]])
if (!have.makefile && vignette_is_tex(output)) { else 2L35: }, output_handler = knit_handlers(options$render, options))) setwd(startdir)54: texi2pdf(file = output, clean = FALSE, quiet = quiet)
withRestartList(expr, restarts[-nr])
36: engine$weave(file, quiet = quiet, encoding = enc)44: doWithOneRestart(return(expr), restart) output <- find_vignette_product(name, by = "weave", engine = engine)
eng_r(options)
45: block_exec(params)
46: call_block(x)55: 37: doTryCatch(return(expr), name, parentenv, handler)
withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 47: 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)))})
59: 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/RtmpT6ACcL/file173097db7d5cf.rds")
An irrecoverable exception occurred. R is aborting now ...
process_group(group)
48: file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173097db7d5cf.rds")
An irrecoverable exception occurred. R is aborting now ...
if (!have.makefile && vignette_is_tex(output)) {withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) texi2pdf(file = output, clean = FALSE, quiet = quiet) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) } error <<- format(cnd)}, error = function(e) { } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) OK <<- FALSE watcher$capture_plot_and_output() message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", output_dir = getwd(), ...) file, conditionMessage(e)))
53: vweave_rmarkdown(...)
54: watcher$print_value(ev$value, ev$visible, envir)engine$weave(file, quiet = quiet, encoding = enc)}) }
59: 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/RtmpT6ACcL/file173097db7d5cf.rds")
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
58: An irrecoverable exception occurred. R is aborting now ...
TRUEtryCatch({ 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) {}, 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))
OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173097db7d5cf.rds")
An irrecoverable exception occurred. R is aborting now ...
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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: 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/RtmpT6ACcL/file173097db7d5cf.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, 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file1730961241fd.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file1730961241fd.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = 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, 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity)
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) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt()
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) 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 } else { rlang::entrace(e) } } }), 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) model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e)56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))}) 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)
59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file1730961241fd.rds")
An irrecoverable exception occurred. R is aborting now ...
prefix <- paste0(prefix, "\n ") } else prefix <- "Error : "
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } 2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: 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: 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) {})lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w,
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) { }) classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations 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) 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)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage")14: }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() }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()) watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { } invisible(structure(msg, class = "try-error", condition = e))}) 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({
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
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: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: 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: 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: 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) {runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: eval(expr, envir)
27: eval(expr, envir)
28: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)}, warning = function (cnd) {
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE 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) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: } TRUE}, handlers)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/RtmpT6ACcL/file1730961241fd.rds")
An irrecoverable exception occurred. R is aborting now ...
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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file1730961241fd.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14:
*** caught segfault ***
address 0x110, cause 'invalid permissions'
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, 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file1730961241fd.rds")
An irrecoverable exception occurred. R is aborting now ...
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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)
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)
Traceback:
5: } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) 1: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)})
30: eval(call)
31: 7: eval(call)tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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({ mi = mi, opts = mi$options)}, error = function(e) {})
8: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({system.time({ model <- mi$model 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) {
32: result <- NULL })with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]]) if (!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 }35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)})
9: 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$iterationsFUN(X[[i]], ...)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) model$status <- result$status
10: lapply(X = S, FUN = FUN, ...)
11: model$message <- result$message38: }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
*** caught segfault ***
address 0x110, cause 'invalid permissions'
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)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(...)doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
14:
tryCatch(expr, error = function(e) {41: 13: tryCatchList(expr, classes, parentenv, handlers) call <- conditionCall(e)
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 <- 75Levaluate(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 sm <- strsplit(conditionMessage(e), "\n")[[1L]] else 2L if (!is.null(call)) { }, output_handler = knit_handlers(options$render, options)) 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 (identical(call[[1L]], quote(doTryCatch))) 42: call <- sys.call(-4L)in_dir(input_dir(), expr) 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]], ...)
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) dcall <- deparse(call, nlines = 1L) 0L18: prefix <- paste("Error in", dcall, ": ")lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores) else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
block_exec(params)
46: call_block(x)
47: LONG <- 75Lprocess_group(group) 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)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { prefix <- paste0(prefix, "\n ") }22: if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), withCallingHandlers(expr, message = function(c) if (inherits(c, error = function(e) { else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) classes)) tryInvokeRestart("muffleMessage")) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15:
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)
if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity)
4: 23: error <<- format(cnd) } else { rlang::entrace(e) } }try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }), function(loc) {
setwd(wd)doTryCatch(return(expr), name, parentenv, handler)
5: write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) 16: paste0("\n", rule(), error, "\n", rule()))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))tryCatchOne(expr, names, parentenv, handlers[[1L]])suppressMessages(suppressWarnings(parallel::mclapply(miList,
runModel, mc.cores = numCores)))
24: }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: 6: 17: FUN(X[[i]], ...)runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26:
18: eval(expr, envir)process_file(text, output)
tryCatchList(expr, classes, parentenv, handlers)51:
27: lapply(seq_len(cores), inner.do)knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
7: tryCatch({eval(expr, envir)52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
28: withVisible(eval(expr, envir)) output_dir = getwd(), ...)
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 53: mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({vweave_rmarkdown(...)
29: withCallingHandlers(code, message = function (cnd)
model <- mi$model54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler) result <- NULL{ tryCatch({ watcher$capture_plot_and_output()
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])19: mi = mi, opts = mi$options) if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") } }, error = function(e) {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, 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 (!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]])
}, warning = function (cnd) 57: {13: if (getOption("warn") >= 2 || getOption("warn") < 0) {tryCatchList(expr, classes, parentenv, handlers)
58: return()tryCatch({ } } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { 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", tryCatchList(expr, classes, parentenv, handlers) invokeRestart("muffleWarning")
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (on_warning$silence) { if (!is.null(call)) { invokeRestart("muffleWarning") }}, error = function (cnd) if (identical(call[[1L]], quote(doTryCatch))) }{ 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) file, conditionMessage(e))) call <- sys.call(-4L)}, error = function (cnd) })
31: eval(call)
32: with_handlers({ dcall <- deparse(call, nlines = 1L){ prefix <- paste("Error in", dcall, ": ") 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)
59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", LONG <- 75L for (expr in tle$exprs) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file1730961241fd.rds")
32: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))An irrecoverable exception occurred. R is aborting now ...
ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
33: type = "b")doWithOneRestart(return(expr), restart) if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n") watcher$capture_plot_and_output()34: watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)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)
.Internal(seterrmessage(msg[1L]))39: 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:
withRestarts(with_handlers({33: doWithOneRestart(return(expr), restart)
34: FUN(X[[i]], ...)
18: for (expr in tle$exprs) {lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores) ev <- withVisible(eval(expr, envir))
withOneRestart(expr, restarts[[1L]])20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
watcher$capture_plot_and_output()37:
withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) watcher$print_value(ev$value, ev$visible, envir)22:
} TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)38:
40: evaluate::evaluate(...)
41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, withCallingHandlers(expr, message = function(c) if (inherits(c, keep_message = if (is.numeric(options$message)) TRUE else options$message, classes)) tryInvokeRestart("muffleMessage"))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 stop_on_error = if (is.numeric(options$error)) options$error else {}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (options$error && options$include)
0L else 2L }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr)
23: 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)))
40: evaluate::evaluate(...)44:
eng_r(options)
45: block_exec(params)
46: call_block(x)
47: process_group(group)suppressMessages(suppressWarnings(parallel::mclapply(miList,
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) 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) error <<- format(cnd)
}27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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() }41: watcher$capture_plot_and_output() else { if (on_warning$capture) { rlang::entrace(e)evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, } } })
49: cnd <- sanitize_call(cnd) 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) 0Lxfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), else 2L error = function(e) { watcher$push(cnd) if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { }, output_handler = knit_handlers(options$render, options)) } if (on_warning$silence) { invokeRestart("muffleWarning") } if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
42: in_dir(input_dir(), expr)
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), keep_message = if (is.numeric(options$message)) TRUE else options$message,
50: process_file(text, output)
stop = invokeRestart("eval_stop"), error = NULL)}) stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
30: 44: eng_r(options)51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), eval(call)
output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54:
45: block_exec(params)engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])31: eval(call)
32:
with_handlers({
46: call_block(x) for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})47:
59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file1730961241fd.rds")
An irrecoverable exception occurred. R is aborting now ...
watcher$capture_plot_and_output()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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
33: if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
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: 53: 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 (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) }vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
} })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), 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)
50: process_file(text, output)
51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file1730961241fd.rds")
An irrecoverable exception occurred. R is aborting now ...
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 <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
59: tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpT6ACcL/file1730961241fd.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