Last updated on 2025-11-21 12:50:26 CET.
| Package | ERROR | OK |
|---|---|---|
| cbcTools | 13 | |
| logitr | 1 | 12 |
| surveydown | 13 |
Current CRAN status: OK: 13
Current CRAN status: ERROR: 1, OK: 12
Version: 1.1.3
Check: examples
Result: ERROR
Running examples in ‘logitr-Ex.R’ failed
The error most likely occurred in:
> ### Name: logitr
> ### Title: The main function for estimating logit models
> ### Aliases: logitr
> ### Keywords: logit logitr mixed mnl mxl willingness-to-pay wtp
>
> ### ** Examples
>
> # For more detailed examples, visit
> # https://jhelvy.github.io/logitr/articles/
>
> library(logitr)
>
> # Estimate a MNL model in the Preference space
> mnl_pref <- logitr(
+ data = yogurt,
+ outcome = "choice",
+ obsID = "obsID",
+ pars = c("price", "feat", "brand")
+ )
Running model...
Done!
>
> # Estimate a MNL model in the WTP space, using a 5-run multistart
> mnl_wtp <- logitr(
+ data = yogurt,
+ outcome = "choice",
+ obsID = "obsID",
+ pars = c("feat", "brand"),
+ scalePar = "price",
+ numMultiStarts = 5
+ )
Running multistart...
Random starting point iterations: 5
Number of cores: 15
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
*** caught segfault ***
address 0x110, cause 'invalid permissions'
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
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)
1:
Traceback:
4: 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)
Traceback:
1: 1: 7: 2: tryCatch({mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8:
eval_f(x0, ...) 2: system.time({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]])
model <- mi$model result <- NULL 6: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { })eval_f(x0, ...) if (!is.null(result)) { model$fail <- FALSE
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) model$coefficients <- result$solution
7: tryCatch({ model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }tryCatchList(expr, classes, parentenv, handlers) 3: })
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) { mi = mi, opts = mi$options)})
8: system.time({ model <- mi$model result <- NULL tryCatch({}, error = function(e) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}) }, error = function(e) {
8: system.time({ model <- mi$model result <- NULL 9: tryCatch({nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective)FUN(X[[i]], ...) model$iterations <- result$iterations
10: lapply(X = S, FUN = FUN, ...)
11: model$status <- result$statusdoTryCatch(return(expr), name, parentenv, handler) model$message <- result$message
}})
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: 9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
mi = mi, opts = mi$options)12:
mi = mi, opts = mi$options) 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)doTryCatch(return(expr), name, parentenv, handler) }, error = function(e) {
5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) })
14: 6: tryCatch(expr, error = function(e) { if (!is.null(result)) { 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 model$fail <- FALSEtryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) {tryCatch({ call <- conditionCall(e) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (!is.null(call)) { model$coefficients <- result$solution sm <- strsplit(conditionMessage(e), "\n")[[1L]] 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]] mi = mi, opts = mi$options) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ 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) if (is.na(w)) prefix <- paste0(prefix, "\n ") model$logLik <- as.numeric(-1 * result$objective) } result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, model$iterations <- result$iterations mi = mi, opts = mi$options) }, error = function(e) { 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: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], })try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...) type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))
11: 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
if (!silent && isTRUE(getOption("show.error.messages"))) { model$status <- result$status model$message <- result$message cat(msg, file = outFile) }doTryCatch(return(expr), name, parentenv, handler)17: FUN(X[[i]], ...)
18: }) .Internal(printDeferredWarnings())
} 9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
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))) invisible(structure(msg, class = "try-error", condition = e)) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)lapply(seq_len(cores), inner.do) prefix <- paste("Error in", dcall, ": ")13: })
15: LONG <- 75L19: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sm <- strsplit(conditionMessage(e), "\n")[[1L]]sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
parallel::mclapply(miList, runModel, mc.cores = numCores)17:
FUN(X[[i]], ...)tryCatchList(expr, classes, parentenv, handlers)
20: if (is.na(w)) 18: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
lapply(seq_len(cores), inner.do)withCallingHandlers(expr, warning = function(w) if (inherits(w, type = "b") classes)) tryInvokeRestart("muffleWarning"))
21:
14: 19: tryCatch(expr, error = function(e) {parallel::mclapply(miList, runModel, mc.cores = numCores)
20: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) call <- conditionCall(e)withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
if (w > LONG) if (!is.null(call)) {22:
22: withCallingHandlers(expr, message = function(c) if (inherits(c, prefix <- paste0(prefix, "\n ") } classes)) tryInvokeRestart("muffleMessage")) if (identical(call[[1L]], quote(doTryCatch))) withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 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") else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ")23: .Internal(seterrmessage(msg[1L]))suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)
}24: else prefix <- "Error : "
runMultistart(modelInputs) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L])) .Internal(printDeferredWarnings())25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5)
if (!silent && isTRUE(getOption("show.error.messages"))) {23: }suppressMessages(suppressWarnings(parallel::mclapply(miList, An irrecoverable exception occurred. R is aborting now ...
invisible(structure(msg, class = "try-error", condition = e))})
runModel, mc.cores = numCores)))15: cat(msg, file = outFile) .Internal(printDeferredWarnings())
}try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: invisible(structure(msg, class = "try-error", condition = e))24: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))})runMultistart(modelInputs)
25:
logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 15: "brand"), scalePar = "price", numMultiStarts = 5)17: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
An irrecoverable exception occurred. R is aborting now ...
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: 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 ...
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"))) { 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:
Traceback:
1: tryCatchList(expr, classes, parentenv, handlers)
58: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
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", 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: engine = engine) }}, error = function(e) { OK <<- FALSEdoTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
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/RtmpYJEIBE/fileeabf32509097.rds")
An irrecoverable exception occurred. R is aborting now ...
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/RtmpYJEIBE/fileeabf32509097.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/RtmpYJEIBE/fileeabf32509097.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19:
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)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",
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 "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: 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: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd)tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() }13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } watcher$capture_plot_and_output() else prefix <- "Error : " if (on_warning$capture) { cnd <- sanitize_call(cnd) 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))}) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output()
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: 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) {FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: } TRUE}, handlers)
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
*** caught segfault ***
*** caught segfault ***
35: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))address 0x110, cause 'invalid permissions'
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: address 0x110, cause 'invalid permissions'
runMultistart(modelInputs)
25: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
39: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
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, 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() stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))
if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning")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: }, 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: 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(call) } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt))
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({ 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) 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)
} 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()))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: }, 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)eng_r(options)
45: block_exec(params)
46: call_block(x)
47: process_group(group)
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)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)
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)52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
error <<- format(cnd) } else { rlang::entrace(e) } } })
49: 55:
doTryCatch(return(expr), name, parentenv, handler)
xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {
Traceback:
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
1: 57: if (progress && is.function(pb$interrupt)) mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 5: pb$interrupt()
tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchList(expr, classes, parentenv, handlers)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) if (xfun::pkg_available("rlang", "1.0.0")) { 6: 58:
tryCatch({
*** caught segfault ***
engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir)tryCatchList(expr, classes, parentenv, handlers) 4: output <- find_vignette_product(name, by = "weave", engine = engine)
7: tryCatch({ if (!have.makefile && vignette_is_tex(output)) { if (is_R_CMD_build() || is_R_CMD_check()) {address 0x110, cause 'invalid permissions'
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, cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd)doTryCatch(return(expr), name, parentenv, handler) texi2pdf(file = output, clean = FALSE, quiet = quiet) mi = mi, opts = mi$options) }
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
}, error = function(e) { else { rlang::entrace(e) }) output <- find_vignette_product(name, by = "texi2pdf", if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations 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", } } }), function(loc) { model$status <- result$status 6: model$message <- result$messagetryCatchList(expr, classes, parentenv, handlers) TRUE, FALSE, "basic_usage", "UTF-8", "/Volumes/Temp/tmp/RtmpYJEIBE/fileeabf32509097.rds")
}})
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)) setwd(wd) 7: write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) 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: 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))})tryCatch({An irrecoverable exception occurred. R is aborting now ...
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 15: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: mi = mi, opts = mi$options)}, error = function(e) {})
8: lapply(seq_len(cores), inner.do)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 <- FALSEdoTryCatch(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)))})19:
model$coefficients <- result$solutionparallel::mclapply(miList, runModel, mc.cores = numCores) model$logLik <- as.numeric(-1 * result$objective)
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)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/RtmpYJEIBE/fileeabf32509097.rds")
An irrecoverable exception occurred. R is aborting now ...
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
eval(expr, envir)
9: 27: eval(expr, envir)
28: withVisible(eval(expr, envir))
FUN(X[[i]], ...)29:
Traceback:
10: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
*** caught segfault ***
2: watcher$push(cnd)lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
address 0x110, cause 'invalid permissions'
13: } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) {tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { call <- sys.call(-4L) cnd <- sanitize_call(cnd) watcher$push(cnd) }eval_f(x0, ...) dcall <- deparse(call, nlines = 1L) if (on_warning$silence) { invokeRestart("muffleWarning")
} prefix <- paste("Error in", dcall, ": ")}, error = function (cnd) { LONG <- 75L
*** caught segfault ***
address 0x110, cause 'invalid permissions'
watcher$capture_plot_and_output() 3: cnd <- sanitize_call(cnd) sm <- strsplit(conditionMessage(e), "\n")[[1L]]nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 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 ") watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)})
}30: eval(call)
31: eval(call)
32: mi = mi, opts = mi$options)with_handlers({ else prefix <- "Error : "
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) {})
msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: 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: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: mi = mi, opts = mi$options)doWithOneRestart(return(expr), restart) }, error = function(e) {
})sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (!is.null(result)) {
model$fail <- FALSE17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: model$coefficients <- result$solution37: parallel::mclapply(miList, runModel, mc.cores = numCores)withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) {20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
})21:
suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
2: 22: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, ev <- withVisible(eval(expr, envir)) mi = mi, opts = mi$options)
withCallingHandlers(expr, message = function(c) if (inherits(c, 9: 4: classes)) tryInvokeRestart("muffleMessage"))FUN(X[[i]], ...)
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)
Traceback:
watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)
} TRUE 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
26: 10: eval(expr, envir)lapply(X = S, FUN = FUN, ...)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, 2:
mi = mi, opts = mi$options)
}, error = function(e) {eval_f(x0, ...)27:
}) 3: 11: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
eval(expr, envir)40: evaluate::evaluate(...)
41: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, doTryCatch(return(expr), name, parentenv, handler) keep_message = if (is.numeric(options$message)) TRUE else options$message,
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) { stop_on_error = if (is.numeric(options$error)) options$error else { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) {
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)) { mi = mi, opts = mi$options) if (options$error && options$include) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L 0L else 2L 8:
4: }, output_handler = knit_handlers(options$render, options)) sm <- strsplit(conditionMessage(e), "\n")[[1L]] invokeRestart("muffleMessage") }
system.time({ w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")42: in_dir(input_dir(), expr)
doTryCatch(return(expr), name, parentenv, handler) model <- mi$model}, warning = function (cnd)
43: { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() 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 <- FALSEin_input_dir(evaluate(code, envir = env, new_device = FALSE, 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") if (on_warning$capture) { 5: cnd <- sanitize_call(cnd) watcher$push(cnd) .Internal(seterrmessage(msg[1L]))tryCatchOne(expr, names, parentenv, handlers[[1L]]) } model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9:
if (!silent && isTRUE(getOption("show.error.messages"))) { 6: FUN(X[[i]], ...)
10: tryCatchList(expr, classes, parentenv, handlers)lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
if (on_warning$silence) { cat(msg, file = outFile)
keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e)) 7: invokeRestart("muffleWarning")12: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
}) }}, error = function (cnd) { watcher$capture_plot_and_output() 8: keep_message = if (is.numeric(options$message)) TRUE else options$message,
stop_on_error = if (is.numeric(options$error)) options$error else { cnd <- sanitize_call(cnd) if (options$error && options$include) 0L else 2Lsystem.time({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))
watcher$push(cnd) model <- mi$model22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
tryCatchOne(expr, names, parentenv, handlers[[1L]])
result <- NULL23: tryCatch({ }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
mi = mi, opts = mi$options) switch(on_error, continue = invokeRestart("eval_continue"), suppressMessages(suppressWarnings(parallel::mclapply(miList, 45: 13: runModel, mc.cores = numCores)))block_exec(params) stop = invokeRestart("eval_stop"), error = NULL) }, error = function(e) { })
})
46: call_block(x)
if (!is.null(result)) { model$fail <- FALSE47: 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)24: tryCatchList(expr, classes, parentenv, handlers)
runMultistart(modelInputs)14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) 30: model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective)eval(call) error <<- format(cnd) } else { model$iterations <- result$iterations 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) model$status <- result$status rlang::entrace(e) model$message <- result$message }})
prefix <- paste0(prefix, "\n ")
} 9: FUN(X[[i]], ...)25:
logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 10: 31: } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))lapply(X = S, FUN = FUN, ...) "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
if (!silent && isTRUE(getOption("show.error.messages"))) { }27: eval(expr, envir)
cat(msg, file = outFile)28: eval(call)
})withVisible(eval(expr, envir)) .Internal(printDeferredWarnings())
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)29:
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) }withCallingHandlers(code, message = function (cnd) }
}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])
14: 36: doWithOneRestart(return(expr), restart)
tryCatch(expr, error = function(e) {37: call <- conditionCall(e)withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) invisible(structure(msg, class = "try-error", condition = e))
38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() }), function(loc) { if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}) watcher$print_value(ev$value, ev$visible, envir) setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
if (is.na(w)) }
50: process_file(text, output) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
51: type = "b"){15: TRUEknitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)}, 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 { watcher$capture_plot_and_output()
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (options$error && options$include) if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") 0L
if (on_message$capture) { .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)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)
output_dir = getwd(), ...)20: withCallingHandlers(expr, warning = function(w) if (inherits(w, .Internal(printDeferredWarnings())
classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) } watcher$push(cnd)
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, else 2L } if (on_message$silence) { invokeRestart("muffleMessage") } invisible(structure(msg, class = "try-error", condition = e))}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() runModel, mc.cores = numCores))) }, output_handler = knit_handlers(options$render, options)) if (on_warning$capture) {
42: cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning")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]])in_dir(input_dir(), expr)
57: }) }
}, 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)})
24:
tryCatchList(expr, classes, parentenv, handlers)30: eval(call)
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) {
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/RtmpYJEIBE/fileeabf32509097.rds")
An irrecoverable exception occurred. R is aborting now ...
43: 15: 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)
try(lapply(X = S, FUN = FUN, ...), silent = TRUE) watcher$push(cnd)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()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) if (xfun::pkg_available("rlang", "1.0.0")) {
if (is_R_CMD_build() || is_R_CMD_check()) { }
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))46: cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { if (on_message$silence) {
invokeRestart("muffleMessage")call_block(x) } rlang::entrace(e)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:
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) } } })suppressMessages(suppressWarnings(parallel::mclapply(miList, }, 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)) runModel, mc.cores = numCores)))
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)49: } })
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 <<- FALSExfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
39: 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: message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 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"), knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) file, conditionMessage(e)))})
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", stop = invokeRestart("eval_stop"), error = NULL)withRestarts(with_handlers({ file, conditionMessage(e)))
}) for (expr in tle$exprs) {
ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir)30: }})eval(call) TRUE59:
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/RtmpYJEIBE/fileeabf32509097.rds")31: eval(call)
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()
An irrecoverable exception occurred. R is aborting now ...
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/RtmpYJEIBE/fileeabf32509097.rds")
}, 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) 0LAn irrecoverable exception occurred. R is aborting now ...
else 2L }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
43: 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) }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()) { 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 = 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) 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,
55: doTryCatch(return(expr), name, parentenv, handler)
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: 56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57: tryCatchList(expr, classes, parentenv, handlers)
58: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc)process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { 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/RtmpYJEIBE/fileeabf32509097.rds")
An irrecoverable exception occurred. R is aborting now ...
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/RtmpYJEIBE/fileeabf32509097.rds")
An irrecoverable exception occurred. R is aborting now ...
Quitting from basic_usage.Rmd:82-91 [unnamed-chunk-7]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `names(x) <- value`:
! 'names' attribute [3] must be the same length as the vector [0]
---
Backtrace:
▆
1. └─logitr::logitr(...)
2. └─logitr:::getMultistartSummary(allModels)
3. └─base::`colnames<-`(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'basic_usage.Rmd' failed with diagnostics:
'names' attribute [3] must be the same length as the vector [0]
--- failed re-building ‘basic_usage.Rmd’
--- re-building ‘benchmark.Rmd’ using rmarkdown
--- finished re-building ‘benchmark.Rmd’
--- re-building ‘convergence.Rmd’ using rmarkdown
--- finished re-building ‘convergence.Rmd’
--- re-building ‘data_formatting.Rmd’ using rmarkdown
--- finished re-building ‘data_formatting.Rmd’
--- re-building ‘interactions.Rmd’ using rmarkdown
--- finished re-building ‘interactions.Rmd’
--- re-building ‘mnl_models.Rmd’ using rmarkdown
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpYJEIBE/fileeabf6193c34a.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, 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) } 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.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpYJEIBE/fileeabf6193c34a.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, 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) } 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.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpYJEIBE/fileeabf6193c34a.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, 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()
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
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
*** caught segfault ***
address 0x110, cause 'invalid permissions'
}, 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.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpYJEIBE/fileeabf6193c34a.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
Traceback:
model$logLik <- as.numeric(-1 * result$objective)
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, 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
model$iterations <- result$iterations model$status <- result$status 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: model$message <- result$messagetryCatchOne(expr, names, parentenv, handlers[[1L]])
}})
9: FUN(X[[i]], ...)
10: 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) { mi = mi, opts = mi$options)lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
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})
8: system.time({ model <- mi$model result <- NULL tryCatch({ 7: tryCatch({ sm <- strsplit(conditionMessage(e), "\n")[[1L]] result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
else prefix <- "Error : " mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ 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)) 9: FUN(X[[i]], ...) model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations}) model$status <- result$status model$message <- result$message }})
10: 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
lapply(X = S, FUN = FUN, ...) 9: FUN(X[[i]], ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12:
Traceback:
tryCatchOne(expr, names, parentenv, handlers[[1L]])18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores) 1:
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
20: 13: 10: lapply(X = S, FUN = FUN, ...)
2: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))eval_f(x0, ...)
3:
11: doTryCatch(return(expr), name, parentenv, handler)
12: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
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) 4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
tryCatchList(expr, classes, parentenv, handlers)
6: 22: 14: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))tryCatchList(expr, classes, parentenv, handlers)
dcall <- deparse(call, nlines = 1L)
tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) prefix <- paste("Error in", dcall, ": ") call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) LONG <- 75L
26: sm <- strsplit(conditionMessage(e), "\n")[[1L]]eval(expr, envir) 7:
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) 27: eval(expr, envir) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
28: withVisible(eval(expr, envir)) mi = mi, opts = mi$options) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))}, error = function(e) {})
29: 8: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
*** caught segfault ***
*** caught segfault ***
type = "b")address 0x110, cause 'invalid permissions'
system.time({ model <- mi$model result <- NULL if (w > LONG) 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) address 0x110, cause 'invalid permissions'
prefix <- paste0(prefix, "\n "){ tryCatch({ 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 (!silent && isTRUE(getOption("show.error.messages"))) { result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") mi = mi, opts = mi$options) cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e)) .Internal(seterrmessage(msg[1L])) }, error = function(e) { }}) if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) if (!silent && isTRUE(getOption("show.error.messages"))) { }){ cat(msg, file = outFile) if (!is.null(result)) { .Internal(printDeferredWarnings())
} model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 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 model$message <- result$message invisible(structure(msg, class = "try-error", condition = e)) }})
})}, handlers)
16:
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35:
9: FUN(X[[i]], ...)withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
38: 15: withRestartList(expr, restarts)17: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)FUN(X[[i]], ...)
16:
39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output()18: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
Traceback:
lapply(seq_len(cores), inner.do)
17: FUN(X[[i]], ...)
18: watcher$print_value(ev$value, ev$visible, envir)
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) }lapply(seq_len(cores), inner.do)19: TRUE 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
19: dcall <- deparse(call, nlines = 1L) 2: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: parallel::mclapply(miList, runModel, mc.cores = numCores)}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
Traceback:
eval_f(x0, ...) prefix <- paste("Error in", dcall, ": ")
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
1: 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, LONG <- 75L classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) mi = mi, opts = mi$options)
sm <- strsplit(conditionMessage(e), "\n")[[1L]]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:
22: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")suppressMessages(suppressWarnings(parallel::mclapply(miList, 40: runModel, mc.cores = numCores)))
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (is.na(w))
6: tryCatchList(expr, classes, parentenv, handlers)
evaluate::evaluate(...)
7: tryCatch({
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)withCallingHandlers(expr, message = function(c) if (inherits(c, result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
24: mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$modelrunMultistart(modelInputs) classes)) tryInvokeRestart("muffleMessage")) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 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
type = "b") model$coefficients <- result$solution 7: model$logLik <- as.numeric(-1 * result$objective)
if (w > LONG) tryCatch({ model$iterations <- result$iterations prefix <- paste0(prefix, "\n ")
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }25: 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", mi = mi, opts = mi$options)}, error = function(e) {})
8: "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)
26: 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) 0Leval(expr, envir) model$status <- result$status 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()) }
else 2L invisible(structure(msg, class = "try-error", condition = e))24: model$message <- result$message }
runMultistart(modelInputs)}) }, output_handler = knit_handlers(options$render, options))
42: in_dir(input_dir(), expr)
system.time({
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 { model <- mi$model})27:
if (options$error && options$include) 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: 0L 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)) {withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning")) 9: else 2Leval(expr, envir)25: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...) model$fail <- FALSElogitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat",
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) model$coefficients <- result$solution
"brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)13:
model$logLik <- as.numeric(-1 * result$objective)
}, output_handler = knit_handlers(options$render, options)))21:
model$iterations <- result$iterations model$status <- result$status model$message <- result$message26: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) }})eval(expr, envir)28:
9: FUN(X[[i]], ...)27:
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, eval(expr, envir) runModel, mc.cores = numCores)))withVisible(eval(expr, envir))tryCatchList(expr, classes, parentenv, handlers)
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)
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()
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))24:
runMultistart(modelInputs)14: cnd <- sanitize_call(cnd)
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),
tryCatch(expr, error = function(e) {28: withVisible(eval(expr, envir))
call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) error = function(e) {17: 29: call <- sys.call(-4L) watcher$push(cnd) if (progress && is.function(pb$interrupt)) 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) {FUN(X[[i]], ...) switch(on_error, continue = invokeRestart("eval_continue"), return() } pb$interrupt() dcall <- deparse(call, nlines = 1L) stop = invokeRestart("eval_stop"), error = NULL) if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity)
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: })18: error <<- format(cnd)
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
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) }
lapply(seq_len(cores), inner.do)30: eval(call)
31: watcher$capture_plot_and_output() else { rlang::entrace(e) } }
eval(call) })27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output()
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)
16:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
19: 33: 49: doWithOneRestart(return(expr), restart)18: lapply(seq_len(cores), inner.do)
if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) {34: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), withOneRestart(expr, restarts[[1L]])19: if (on_warning$capture) { invokeRestart("muffleMessage")parallel::mclapply(miList, runModel, mc.cores = numCores) cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd)
}}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) }parallel::mclapply(miList, runModel, mc.cores = numCores) error = function(e) {
{ if (on_warning$silence) { if (progress && is.function(pb$interrupt))
35: invokeRestart("muffleWarning")20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("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)
pb$interrupt()
32: withRestartList(expr, restarts[-nr])21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: watcher$capture_plot_and_output()20: withCallingHandlers(expr, warning = function(w) if (inherits(w, cnd <- sanitize_call(cnd)withCallingHandlers(expr, message = function(c) if (inherits(c,
classes)) tryInvokeRestart("muffleMessage")) if (xfun::pkg_available("rlang", "1.0.0")) {with_handlers({36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
watcher$push(cnd) classes)) tryInvokeRestart("muffleWarning")) for (expr in tle$exprs) { if (is_R_CMD_build() || is_R_CMD_check()) { switch(on_error, continue = invokeRestart("eval_continue"),
39: stop = invokeRestart("eval_stop"), error = NULL) cnd = tryCatch(rlang::entrace(e), error = identity)
ev <- withVisible(eval(expr, envir)) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { watcher$capture_plot_and_output()withRestarts(with_handlers({23: suppressMessages(suppressWarnings(parallel::mclapply(miList, for (expr in tle$exprs) {})
watcher$print_value(ev$value, ev$visible, envir) runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)30: ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) }21: setwd(wd) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40:
TRUEeval(call)evaluate::evaluate(...)25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
}, handlers)
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
36: doWithOneRestart(return(expr), restart)31: write_utf8(res, output %n% stdout())eval(call)41:
22: "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) paste0("\nQuitting from ", loc, if (!is.null(error))
evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, paste0("\n", rule(), error, "\n", rule()))
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))32: keep_message = if (is.numeric(options$message)) TRUE else options$message, }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) stop_on_error = if (is.numeric(options$error)) options$error else {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: if (options$error && options$include) withCallingHandlers(expr, message = function(c) if (inherits(c, 0L else 2L
50: process_file(text, output)
51: }, output_handler = knit_handlers(options$render, options))knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)29:
42:
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: doWithOneRestart(return(expr), restart)withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage")in_dir(input_dir(), expr)
classes)) tryInvokeRestart("muffleMessage"))34: }vweave_rmarkdown(...)withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
54:
43: engine$weave(file, quiet = quiet, encoding = enc)}, warning = function (cnd) {
in_input_dir(evaluate(code, envir = env, new_device = FALSE, 36: doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, if (getOption("warn") >= 2 || getOption("warn") < 0) {
withRestartList(expr, restarts) keep_message = if (is.numeric(options$message)) TRUE else options$message, 38: 55: return()
39: 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) } }23: } })suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
watcher$capture_plot_and_output()
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 (on_warning$capture) {doTryCatch(return(expr), name, parentenv, handler) stop_on_error = if (is.numeric(options$error)) options$error else {24: if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) }withRestarts(with_handlers({
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", for (expr in tle$exprs) {runMultistart(modelInputs) if (options$error && options$include) 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/RtmpYJEIBE/fileeabf6193c34a.rds")
An irrecoverable exception occurred. R is aborting now ...
}
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", 0L else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: ev <- withVisible(eval(expr, envir)) 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({ "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) }), function(loc) { setwd(wd) 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 { for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) write_utf8(res, output %n% stdout()) if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) watcher$capture_plot_and_output()block_exec(params)
46: call_block(x)
paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
26: watcher$print_value(ev$value, ev$visible, envir)50: 47: 42: in_dir(input_dir(), expr)eval(expr, envir)process_group(group)process_file(text, output)
} 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:
27: withRestartList(expr, restarts)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
43: eval(expr, envir)
in_input_dir(evaluate(code, envir = env, new_device = FALSE, 39: withRestarts(with_handlers({ for (expr in tle$exprs) {51: error = function(e) { 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 2L28: withVisible(eval(expr, envir)) 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) }knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) ev <- withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) else { rlang::entrace(e) } }, output_handler = knit_handlers(options$render, options))) }{52:
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() }44: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) })
watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: 49: eng_r(options)xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 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)
53: 32: with_handlers({ for (expr in tle$exprs) {vweave_rmarkdown(...)
45: error = function(e) { ev <- withVisible(eval(expr, envir))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))
if (progress && is.function(pb$interrupt)) 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]])42: pb$interrupt()
if (xfun::pkg_available("rlang", "1.0.0")) {54: in_dir(input_dir(), expr)engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: 35: if (is_R_CMD_build() || is_R_CMD_check()) {tryCatchOne(expr, names, parentenv, handlers[[1L]])withRestartList(expr, restarts[-nr])
cnd = tryCatch(rlang::entrace(e), error = identity)
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, 36: block_exec(params)
keep_message = if (is.numeric(options$message)) TRUE else options$message, 57: stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L46: call_block(x)
47: process_group(group)
error <<- format(cnd) } else { rlang::entrace(e) } } else 2L48: 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")) { }), function(loc) {doWithOneRestart(return(expr), restart)
if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } }, output_handler = knit_handlers(options$render, options)))
37: setwd(wd)44: 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({withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])eng_r(options)
engine$weave(file, quiet = quiet, encoding = enc)
}tryCatchList(expr, classes, parentenv, handlers)45: setwd(startdir)block_exec(params)
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 = "weave", engine = engine)
output <- find_vignette_product(name, by = "texi2pdf", if (!have.makefile && vignette_is_tex(output)) {38: withRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) { engine = engine) }}, error = function(e) { OK <<- FALSE ev <- withVisible(eval(expr, envir))
46: call_block(x)
49: watcher$capture_plot_and_output()xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), watcher$print_value(ev$value, ev$visible, envir) error = function(e) {47: } 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) } message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", } }), function(loc) { setwd(wd)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) write_utf8(res, output %n% stdout()) TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
40: } file, conditionMessage(e))) paste0("\nQuitting from ", loc, if (!is.null(error)) engine = engine)})
59: } else {evaluate::evaluate(...)}, error = function(e) {
tools:::.buildOneVignette("mnl_models.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", rlang::entrace(e) } } })
OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 41: TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpYJEIBE/fileeabf6193c34a.rds")49: 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 paste0("\n", rule(), error, "\n", rule()))xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
file, conditionMessage(e))) else 2L}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) }, output_handler = knit_handlers(options$render, options))
error = function(e) {
42: An irrecoverable exception occurred. R is aborting now ...
if (progress && is.function(pb$interrupt)) })in_dir(input_dir(), expr)
50:
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/RtmpYJEIBE/fileeabf6193c34a.rds")
43: pb$interrupt()in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L if (xfun::pkg_available("rlang", "1.0.0")) {An irrecoverable exception occurred. R is aborting now ...
else 2L if (is_R_CMD_build() || is_R_CMD_check()) {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_handler = knit_handlers(options$render, options))) output_dir = getwd(), ...)
53: cnd = tryCatch(rlang::entrace(e), error = identity)
vweave_rmarkdown(...)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: 44: error <<- format(cnd)doTryCatch(return(expr), name, parentenv, handler)eng_r(options) } else { rlang::entrace(e) }
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
45: block_exec(params)
46: call_block(x)
57: 47: tryCatchList(expr, classes, parentenv, handlers) }
}), 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)
58: 52: process_group(group)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
53: vweave_rmarkdown(...)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/RtmpYJEIBE/fileeabf6193c34a.rds")
An irrecoverable exception occurred. R is aborting now ...
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])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)
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", 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.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/Volumes/Temp/tmp/RtmpYJEIBE/fileeabf6193c34a.rds")
An irrecoverable exception occurred. R is aborting now ...
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/RtmpYJEIBE/fileeabf6193c34a.rds")
An irrecoverable exception occurred. R is aborting now ...
Quitting from mnl_models.Rmd:85-98 [unnamed-chunk-9]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `names(x) <- value`:
! 'names' attribute [3] must be the same length as the vector [0]
---
Backtrace:
▆
1. └─logitr::logitr(...)
2. └─logitr:::getMultistartSummary(allModels)
3. └─base::`colnames<-`(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'mnl_models.Rmd' failed with diagnostics:
'names' attribute [3] must be the same length as the vector [0]
--- failed re-building ‘mnl_models.Rmd’
--- re-building ‘mnl_models_weighted.Rmd’ using rmarkdown
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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
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) else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: block_exec(params)
46: call_block(x)
47:
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, process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ 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) 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) { } else { rlang::entrace(e) } } })
49: }) 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$messagexfun:::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) }})
9: FUN(X[[i]], ...) error <<- format(cnd) } else { rlang::entrace(e) }
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
} }), 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(), ...)12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13:
53: vweave_rmarkdown(...)
54: 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)engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
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)) 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) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") 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))) } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)})
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/RtmpYJEIBE/fileeabf21171937.rds")
An irrecoverable exception occurred. R is aborting now ...
.Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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/RtmpYJEIBE/fileeabf21171937.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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/RtmpYJEIBE/fileeabf21171937.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = 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)
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2:
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)eval_f(x0, ...) }
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } 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 watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") } 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]])
}, error = function (cnd) 13:
Traceback:
1: { 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)})
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)30: eval(call)
2: eval_f(x0, ...)tryCatchList(expr, classes, parentenv, handlers)
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)14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) {
Traceback:
1: 3: 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) { } if (identical(call[[1L]], quote(doTryCatch))) nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }) TRUE}, handlers) mi = mi, opts = mi$options) call <- sys.call(-4L)
4: 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 : "
doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8: system.time({
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 <- mi$model
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)
result <- NULL40: 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 { tryCatch({ msg <- paste0(prefix, conditionMessage(e), "\n") result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (options$error && options$include) 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) 0L else 2L }, output_handler = knit_handlers(options$render, options))
model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)42: .Internal(seterrmessage(msg[1L])) model$iterations <- result$iterations if (!silent && isTRUE(getOption("show.error.messages"))) {
in_dir(input_dir(), expr) model$status <- result$status cat(msg, file = outFile)
model$message <- result$message10: 43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, lapply(X = S, FUN = FUN, ...)
.Internal(printDeferredWarnings())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) keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...) keep_message = if (is.numeric(options$message)) TRUE else options$message,
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, ": ") if (!is.null(call)) { stop_on_error = if (is.numeric(options$error)) options$error else { if (identical(call[[1L]], quote(doTryCatch))) } invisible(structure(msg, class = "try-error", condition = e)) 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 (options$error && options$include) if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " 0L else 2L }, output_handler = knit_handlers(options$render, options)))
LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]44: eng_r(options)
45: block_exec(params)
46:
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 ") }call_block(x) msg <- paste0(prefix, conditionMessage(e), "\n") else prefix <- "Error : "15: .Internal(seterrmessage(msg[1L]))try(lapply(X = S, FUN = FUN, ...), silent = TRUE) msg <- paste0(prefix, conditionMessage(e), "\n")
if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)47: .Internal(seterrmessage(msg[1L]))process_group(group)
.Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)16:
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) }17: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) invisible(structure(msg, class = "try-error", condition = e))48: })
FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 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:
error = function(e) {parallel::mclapply(miList, runModel, mc.cores = numCores) if (progress && is.function(pb$interrupt)) pb$interrupt()
20: 15: 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) 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 {withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))try(lapply(X = S, FUN = FUN, ...), silent = TRUE) rlang::entrace(e)
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")) }28: } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) 21: paste0("\n", rule(), error, "\n", rule()))withVisible(eval(expr, envir))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
21:
suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))29: withCallingHandlers(code, message = function (cnd)
*** caught segfault ***
22: {withCallingHandlers(expr, message = function(c) if (inherits(c,
watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) }
classes)) tryInvokeRestart("muffleMessage"))23:
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))suppressMessages(suppressWarnings(parallel::mclapply(miList, 50: process_file(text, output)
if (on_message$silence) {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) invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { runModel, mc.cores = numCores)))address 0x110, cause 'invalid permissions'
cnd <- sanitize_call(cnd)24:
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) watcher$push(cnd)
runMultistart(modelInputs)26: eval(expr, envir)
55:
}doTryCatch(return(expr), name, parentenv, handler)25: 27:
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])logitr(data = cars_us, outcome = "choice", obsID = "obsnum", eval(expr, envir)
28: withVisible(eval(expr, envir))
if (on_warning$silence) {
57: tryCatchList(expr, classes, parentenv, handlers)
58: tryCatch({ invokeRestart("muffleWarning") 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", 29: engine = engine)withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", }}, 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/RtmpYJEIBE/fileeabf21171937.rds")
An irrecoverable exception occurred. R is aborting now ...
}, error = function (cnd) { watcher$capture_plot_and_output() 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) cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$push(cnd) watcher$capture_plot_and_output() switch(on_error, continue = invokeRestart("eval_continue"), cnd <- sanitize_call(cnd) stop = invokeRestart("eval_stop"), error = NULL) "bev150", "american", "japanese", "chinese", "skorean", 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))})
30: eval(call)
31: eval(call)
32: with_handlers({ for (expr in tle$exprs) { "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), watcher$capture_plot_and_output() ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) scalePar = "price", robust = TRUE, numMultiStarts = 10)
}26: watcher$print_value(ev$value, ev$visible, envir) TRUEeval(expr, envir) }}, handlers)
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]])
27: 33: 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) }eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) {
Traceback:
TRUE watcher$push(cnd)doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) 1:
40: evaluate::evaluate(...)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: }36: if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) {
doTryCatch(return(expr), name, parentenv, handler)doWithOneRestart(return(expr), restart)
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 if (getOption("warn") >= 2 || getOption("warn") < 0) { 5: 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) return()tryCatchOne(expr, names, parentenv, handlers[[1L]])37:
withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) } } })
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) 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 <- NULL38: } } tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { watcher$capture_plot_and_output() 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: }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solutionwithRestartList(expr, restarts)
39: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } if (on_warning$capture) {process_file(text, output) TRUE 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: }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)eval(call)
40: evaluate::evaluate(...)
41: 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, ...)32:
with_handlers({11: 51: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) keep_message = if (is.numeric(options$message)) TRUE else options$message,
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), for (expr in tle$exprs) { stop_on_error = if (is.numeric(options$error)) options$error else { ev <- withVisible(eval(expr, envir)) if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))
output_dir = getwd(), ...) watcher$capture_plot_and_output()
watcher$print_value(ev$value, ev$visible, envir)42: 53: in_dir(input_dir(), expr)
43: in_input_dir(evaluate(code, envir = env, new_device = FALSE, doTryCatch(return(expr), name, parentenv, handler) }
vweave_rmarkdown(...) TRUE}, handlers)12:
33: doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, tryCatchOne(expr, names, parentenv, handlers[[1L]])
keep_message = if (is.numeric(options$message)) TRUE else options$message, 13: tryCatchList(expr, classes, parentenv, handlers)35: stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)withRestartList(expr, restarts[-nr])
36: 54:
engine$weave(file, quiet = quiet, encoding = enc)doWithOneRestart(return(expr), restart)
37: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
38: withRestartList(expr, restarts)
39: 55:
withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))doTryCatch(return(expr), name, parentenv, handler)14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)45: block_exec(params)
46: call_block(x)
47: process_group(group)
dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]
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()) {56: watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")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) 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 : " cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 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))
} } })
57: 49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) {})
15: tryCatchList(expr, classes, parentenv, handlers) if (progress && is.function(pb$interrupt))
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)47: process_group(group)
48:
58: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { pb$interrupt()tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, 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/RtmpYJEIBE/fileeabf21171937.rds")
An irrecoverable exception occurred. R is aborting now ...
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) 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) } } })
write_utf8(res, output %n% stdout())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) }
paste0("\nQuitting from ", loc, if (!is.null(error)) 16: paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
50: process_file(text, output) }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }), function(loc) {
setwd(wd)51: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
write_utf8(res, output %n% stdout())52: paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) output_dir = getwd(), ...)
53: 50: vweave_rmarkdown(...)process_file(text, output)
54: engine$weave(file, quiet = quiet, encoding = enc)
55: doTryCatch(return(expr), name, parentenv, handler)
56: tryCatchOne(expr, names, parentenv, handlers[[1L]])
57:
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: 17: tryCatchList(expr, classes, parentenv, handlers)
*** caught segfault ***
FUN(X[[i]], ...)
tryCatchOne(expr, names, parentenv, handlers[[1L]])
58: address 0x110, cause 'invalid permissions'
18: 57: 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)lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: tryCatchList(expr, classes, parentenv, handlers)
58: output <- find_vignette_product(name, by = "texi2pdf", tryCatch({withCallingHandlers(expr, warning = function(w) if (inherits(w, engine$weave(file, quiet = quiet, encoding = enc) engine = engine) classes)) tryInvokeRestart("muffleWarning"))
21: 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) }suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))}, error = function(e) {
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: }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", OK <<- FALSE 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/RtmpYJEIBE/fileeabf21171937.rds")logitr(data = cars_us, outcome = "choice", obsID = "obsnum",
An irrecoverable exception occurred. R is aborting now ...
message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 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) { 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/RtmpYJEIBE/fileeabf21171937.rds")
An irrecoverable exception occurred. R is aborting now ...
watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() 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/RtmpYJEIBE/fileeabf21171937.rds")
An irrecoverable exception occurred. R is aborting now ...
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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) {
*** caught segfault ***
address 0x110, cause 'invalid permissions'
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/RtmpYJEIBE/fileeabf21171937.rds")
An irrecoverable exception occurred. R is aborting now ...
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = cars_us, outcome = "choice", obsID = "obsnum", pars = c("hev", "phev10", "phev20", "phev40", "bev75", "bev100", "bev150", "american", "japanese", "chinese", "skorean", "phevFastcharge", "bevFastcharge", "opCost", "accelTime"), scalePar = "price", robust = TRUE, numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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/RtmpYJEIBE/fileeabf21171937.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/RtmpYJEIBE/fileeabf280d5c20.rds")
An irrecoverable exception occurred. R is aborting now ...
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: eval_f(x0, ...)
3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {})
8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
10: lapply(X = S, FUN = FUN, ...)
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)
26: eval(expr, envir)
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, 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)
*** caught segfault ***
address 0x110, cause 'invalid permissions'
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/RtmpYJEIBE/fileeabf280d5c20.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:
Traceback:
suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
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)
2:
Traceback:
27: eval(expr, envir)eval_f(x0, ...)
28: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)withVisible(eval(expr, envir))
*** caught segfault ***
2: 29: eval_f(x0, ...)
withCallingHandlers(code, message = function (cnd) 3: 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)address 0x110, cause 'invalid permissions'
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler){
watcher$capture_plot_and_output() 5:
*** caught segfault ***
tryCatchOne(expr, names, parentenv, handlers[[1L]])address 0x110, cause 'invalid permissions'
if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) {
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)
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) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output()}, error = function(e) {})}) if (on_warning$capture) { cnd <- sanitize_call(cnd)
watcher$push(cnd) 8: system.time({ } model <- mi$model
8: if (on_warning$silence) { 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
Traceback:
invokeRestart("muffleWarning") } model$logLik <- as.numeric(-1 * result$objective)}, error = function (cnd) model$iterations <- result$iterations{ model$status <- result$statussystem.time({ model$message <- result$message 1: }}) model <- mi$model watcher$capture_plot_and_output()
*** caught segfault ***
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
result <- NULL cnd <- sanitize_call(cnd) watcher$push(cnd) 9: FUN(X[[i]], ...)
10: 2: address 0x110, cause 'invalid permissions'
switch(on_error, continue = invokeRestart("eval_continue"), lapply(X = S, FUN = FUN, ...)eval_f(x0, ...) 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 3: model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations stop = invokeRestart("eval_stop"), error = NULL) model$status <- result$status model$message <- result$message }})
9: FUN(X[[i]], ...)
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, })10:
Traceback:
lapply(X = S, FUN = FUN, ...) 1: mi = mi, opts = mi$options)
mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)
2: 4: doTryCatch(return(expr), name, parentenv, handler)
5: 11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: tryCatchList(expr, classes, parentenv, handlers)
tryCatchOne(expr, names, parentenv, handlers[[1L]])14:
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: tryCatch(expr, error = function(e) {
call <- conditionCall(e)11: 30: eval(call)eval_f(x0, ...)
31: eval(call)
doTryCatch(return(expr), name, parentenv, handler) 6: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)
tryCatchList(expr, classes, parentenv, handlers) dcall <- deparse(call, nlines = 1L)
32: 6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ 3: result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective,
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: mi = mi, opts = mi$options)tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(expr, error = function(e) { mi = mi, opts = mi$options)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
call <- conditionCall(e)}, error = function(e) { 6: })
*** caught segfault ***
prefix <- paste("Error in", dcall, ": ") LONG <- 75L
address 0x110, cause 'invalid permissions'
sm <- strsplit(conditionMessage(e), "\n")[[1L]] 8: with_handlers({
for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE if (!is.null(call)) {tryCatchList(expr, classes, parentenv, handlers)}, handlers) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)system.time({ prefix <- paste("Error in", dcall, ": ") 7:
7: LONG <- 75L
33: doWithOneRestart(return(expr), restart)
model <- mi$model if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")
Traceback:
sm <- strsplit(conditionMessage(e), "\n")[[1L]]34: 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)
tryCatch({withOneRestart(expr, restarts[[1L]])
5: result <- NULL w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatch({tryCatch({ if (w > LONG) 35: if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") prefix <- paste0(prefix, "\n ")tryCatchOne(expr, names, parentenv, handlers[[1L]]) result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, } mi = mi, opts = mi$options) if (w > LONG)
prefix <- paste0(prefix, "\n ") 6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, }, error = function(e) {}) else prefix <- "Error : " mi = mi, opts = mi$options)
mi = mi, opts = mi$options)}, error = function(e) { msg <- paste0(prefix, conditionMessage(e), "\n")}, error = function(e) {})})
8: .Internal(seterrmessage(msg[1L])) 8: 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: }system.time({ model <- mi$modelsystem.time({ else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") result <- NULLwithRestartList(expr, restarts[-nr])FUN(X[[i]], ...)
8: 10: model <- mi$modellapply(X = S, FUN = FUN, ...)
11: tryCatch({doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
13: .Internal(seterrmessage(msg[1L])) result <- NULL if (!silent && isTRUE(getOption("show.error.messages"))) {
result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, if (!silent && isTRUE(getOption("show.error.messages"))) {system.time({ mi = mi, opts = mi$options)tryCatchList(expr, classes, parentenv, handlers) tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) cat(msg, file = outFile)36:
Traceback:
1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) model <- mi$model }, error = function(e) {doWithOneRestart(return(expr), restart) }) 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)) { .Internal(printDeferredWarnings()) }, error = function(e) {
2: eval_f(x0, ...)
cat(msg, file = outFile) } }) 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]], ...)14: if (identical(call[[1L]], quote(doTryCatch))) .Internal(printDeferredWarnings()) 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.null(result)) { 3: result <- NULLtryCatch(expr, error = function(e) { if (is.na(w)) } model$fail <- FALSE 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: 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)) {
nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatch({
call <- conditionCall(e)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() 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 : " w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, 18: mi = mi, opts = mi$options)lapply(seq_len(cores), inner.do)
19: parallel::mclapply(miList, runModel, mc.cores = numCores)
msg <- paste0(prefix, conditionMessage(e), "\n")20: watcher$print_value(ev$value, ev$visible, envir)parallel::mclapply(miList, runModel, mc.cores = numCores) type = "b")
if (w > LONG) prefix <- paste0(prefix, "\n ")withCallingHandlers(expr, warning = function(w) if (inherits(w, 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) .Internal(seterrmessage(msg[1L])) } if (identical(call[[1L]], quote(doTryCatch))) classes)) tryInvokeRestart("muffleWarning")) mi = mi, opts = mi$options)
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: if (!silent && isTRUE(getOption("show.error.messages"))) {
}, error = function(e) { }, error = function(e) {logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", else prefix <- "Error : " call <- sys.call(-4L)}) "brand"), scalePar = "price", numMultiStarts = 10) })
26: eval(expr, envir)
27: eval(expr, envir)
28: dcall <- deparse(call, nlines = 1L) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) }
withVisible(eval(expr, envir)) msg <- paste0(prefix, conditionMessage(e), "\n") prefix <- paste("Error in", dcall, ": ") model$iterations <- result$iterations 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])) TRUE 8:
.Internal(seterrmessage(msg[1L]))29: if (!silent && isTRUE(getOption("show.error.messages"))) {}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) if (!silent && isTRUE(getOption("show.error.messages"))) {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 cat(msg, file = outFile) 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)) .Internal(printDeferredWarnings())
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 cat(msg, file = outFile)20:
model$status <- result$status17: 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)withCallingHandlers(code, message = function (cnd) model$message <- result$messagewithCallingHandlers(expr, warning = function(w) if (inherits(w, } model$message <- result$message .Internal(printDeferredWarnings()) }, output_handler = knit_handlers(options$render, options)) } classes)) tryInvokeRestart("muffleWarning")){ } }
invisible(structure(msg, class = "try-error", condition = e))
watcher$capture_plot_and_output()}) invisible(structure(msg, class = "try-error", condition = e))42: })21: if (on_message$capture) {
})
})27: eval(expr, envir)
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: in_dir(input_dir(), expr) 9: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) watcher$push(cnd)
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: }
suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
if (on_message$silence) {suppressMessages(suppressWarnings(parallel::mclapply(miList, 28: runModel, mc.cores = numCores)))
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)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) FUN(X[[i]], ...) invokeRestart("muffleMessage")
9: FUN(X[[i]], ...)
10: 15: 26: }
43: {eval(expr, envir)10:
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) {
27: eval(expr, envir)
28: withVisible(eval(expr, envir))
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)lapply(X = S, FUN = FUN, ...)
16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
17: FUN(X[[i]], ...)
18: in_input_dir(evaluate(code, envir = env, new_device = FALSE,
}, warning = function (cnd) 29: 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)))lapply(X = S, FUN = FUN, ...)11: doTryCatch(return(expr), name, parentenv, handler)
12: lapply(seq_len(cores), inner.do)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)44: 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$capture_plot_and_output()
tryCatchOne(expr, names, parentenv, handlers[[1L]]) watcher$push(cnd) watcher$push(cnd) if (getOption("warn") >= 2 || getOption("warn") < 0) {19: 11:
if (on_message$capture) {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))) }parallel::mclapply(miList, runModel, mc.cores = numCores) switch(on_error, continue = invokeRestart("eval_continue"),
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", return() watcher$push(cnd) call <- sys.call(-4L) if (on_warning$silence) { 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)) 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) }eng_r(options) "brand"), scalePar = "price", numMultiStarts = 10) }
doTryCatch(return(expr), name, parentenv, handler) stop = invokeRestart("eval_stop"), error = NULL)
if (on_message$silence) {
watcher$capture_plot_and_output()26: 33:
17: FUN(X[[i]], ...) invokeRestart("muffleMessage")doWithOneRestart(return(expr), restart)45: eval(expr, envir)
27: } 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()eval(expr, envir)
28: withVisible(eval(expr, envir))
34: })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"))
withOneRestart(expr, restarts[[1L]])block_exec(params)29: cnd <- sanitize_call(cnd) watcher$push(cnd)
}, warning = function (cnd) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))
{
46: withCallingHandlers(code, message = function (cnd) { switch(on_error, continue = invokeRestart("eval_continue"), 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
30: if (getOption("warn") >= 2 || getOption("warn") < 0) {call_block(x)
47: process_group(group)
48:
24: runMultistart(modelInputs)
25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10)withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), eval(call)
31: eval(call)
return()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$capture_plot_and_output()
error = function(e) { }13: watcher$print_value(ev$value, ev$visible, envir)32: 26: with_handlers({ for (expr in tle$exprs) { if (on_message$capture) {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 : " stop = invokeRestart("eval_stop"), error = NULL)eval(expr, envir) if (progress && is.function(pb$interrupt)) watcher$push(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) } } })
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$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() watcher$capture_plot_and_output() msg <- paste0(prefix, conditionMessage(e), "\n") TRUE .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)
}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)}) if (on_warning$capture) { cnd <- sanitize_call(cnd)
20: 27: eval(expr, envir)
28: withVisible(eval(expr, envir))
29: withCallingHandlers(code, message = function (cnd)
cnd <- sanitize_call(cnd)30: eval(call) ev <- withVisible(eval(expr, envir)) }withCallingHandlers(expr, warning = function(w) if (inherits(w,
{ watcher$push(cnd) watcher$capture_plot_and_output() watcher$push(cnd) watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers) else { watcher$capture_plot_and_output()
switch(on_error, continue = invokeRestart("eval_continue"), 31: classes)) tryInvokeRestart("muffleWarning"))eval(call)
32: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir))40: } rlang::entrace(e) if (on_message$capture) {
stop = invokeRestart("eval_stop"), error = NULL)21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))
22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage"))
23: suppressMessages(suppressWarnings(parallel::mclapply(miList, 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)
if (on_warning$silence) { watcher$capture_plot_and_output() watcher$push(cnd)
}evaluate::evaluate(...) invokeRestart("muffleWarning") watcher$print_value(ev$value, ev$visible, envir)28: } 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) { if (on_message$silence) { } } } }), 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(...)
}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd)33: })doWithOneRestart(return(expr), restart)
34: withOneRestart(expr, restarts[[1L]])
35: withRestartList(expr, restarts[-nr])
54: watcher$push(cnd)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) { 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) ev <- withVisible(eval(expr, envir))41: 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, withVisible(eval(expr, envir))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)
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)36:
30: OK <<- FALSEeval(call) 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)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({ message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 33: 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/RtmpYJEIBE/fileeabf280d5c20.rds")
An irrecoverable exception occurred. R is aborting now ...
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) } else { rlang::entrace(e) } }
40: evaluate::evaluate(...)
41: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L for (expr in tle$exprs) { 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, 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, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, doWithOneRestart(return(expr), restart) keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: block_exec(params)
46: call_block(x)
47: process_group(group)
48: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity)
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 keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, }) stop_on_error = if (is.numeric(options$error)) options$error else {
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) 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, 29: keep_message = if (is.numeric(options$message)) TRUE else options$message, }, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE) stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
44: eng_r(options)
45: block_exec(params)
46: call_block(x) error <<- format(cnd) stop_on_error = if (is.numeric(options$error)) options$error else {
})
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) }withCallingHandlers(code, message = function (cnd) if (options$error && options$include) 34: }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")) { 0LwithOneRestart(expr, restarts[[1L]]) else {{ rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) 40: else 2Levaluate::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 (is_R_CMD_build() || is_R_CMD_check()) { paste0("\n", rule(), error, "\n", rule())) watcher$capture_plot_and_output()}, 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({ }, output_handler = knit_handlers(options$render, options))) 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)
if (options$error && options$include) cnd = tryCatch(rlang::entrace(e), error = identity) engine$weave(file, quiet = quiet, encoding = enc) error <<- format(cnd) }35: 31: else {
setwd(startdir) 0L 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/RtmpYJEIBE/fileeabf280d5c20.rds")
eval(call) 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) rlang::entrace(e)
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: An irrecoverable exception occurred. R is aborting now ...
withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]]) } } else { }withRestartList(expr, restarts[-nr])
44: })
49:
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)36: rlang::entrace(e) else { } } })
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: 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)rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 38: 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({doWithOneRestart(return(expr), restart) engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine)
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) } }
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, 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) 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) if (!have.makefile && vignette_is_tex(output)) { else { rlang::entrace(e) } } })
49: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) }}, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
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/RtmpYJEIBE/fileeabf280d5c20.rds")
An irrecoverable exception occurred. R is aborting now ...
withRestartList(expr, restarts) setwd(startdir) }
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)))
}), function(loc) { 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)
output <- find_vignette_product(name, by = "weave", engine = engine)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)44: 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) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) 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: if (!have.makefile && vignette_is_tex(output)) {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/RtmpYJEIBE/fileeabf280d5c20.rds")
An irrecoverable exception occurred. R is aborting now ...
setwd(wd) write_utf8(res, output %n% stdout())eng_r(options)
45: block_exec(params)
46: texi2pdf(file = output, clean = FALSE, quiet = quiet)call_block(x) }
paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))47: output <- find_vignette_product(name, by = "texi2pdf", }, error = function(e) { OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc) file, conditionMessage(e))) engine = engine)})
}50: }, error = function(e) {process_group(group)process_file(text, output)
51: 59: OK <<- FALSE48: 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) } } })
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/RtmpYJEIBE/fileeabf280d5c20.rds")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")) {knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
tools:::.buildOneVignette("predict.Rmd", "/Volumes/Builds/packages/big-sur-arm64/results/4.5/logitr.Rcheck/vign_test/logitr",
An irrecoverable exception occurred. R is aborting now ...
TRUE, FALSE, "predict", "UTF-8", "/Volumes/Temp/tmp/RtmpYJEIBE/fileeabf280d5c20.rds")
An irrecoverable exception occurred. R is aborting now ...
52: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd)
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))) } 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: })
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/RtmpYJEIBE/fileeabf280d5c20.rds")
An irrecoverable exception occurred. R is aborting now ...
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/RtmpYJEIBE/fileeabf280d5c20.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
Current CRAN status: OK: 13