* using log directory ‘/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck’ * using R Under development (unstable) (2023-09-17 r85158) * using platform: aarch64-apple-darwin22.6.0 * R was compiled by Apple clang version 15.0.0 (clang-1500.0.40.1) GNU Fortran (GCC) 12.2.0 * running under: macOS Ventura 13.5.2 * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘logitr/DESCRIPTION’ ... OK * this is package ‘logitr’ version ‘1.1.0’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘logitr’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking whether startup messages can be suppressed ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... 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: 2 *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$model result <- NULL tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) }, error = function(e) { }) if (!is.null(result)) { model$fail <- FALSE model$coefficients <- result$solution model$logLik <- as.numeric(-1 * result$objective) model$iterations <- result$iterations model$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 15: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 16: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 17: FUN(X[[i]], ...) 18: lapply(seq_len(cores), inner.do) 19: parallel::mclapply(miList, runModel, mc.cores = numCores) 20: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) 21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores))) 24: runMultistart(modelInputs) 25: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 5) An irrecoverable exception occurred. R is aborting now ... Error in names(x) <- value : 'names' attribute [3] must be the same length as the vector [0] Calls: logitr -> getMultistartSummary -> colnames<- Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [14s/15s] [14s/15s] OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking re-building of vignette outputs ... [16s/17s] ERROR Error(s) in re-building vignettes: --- re-building ‘basic_usage.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, enclos) 27: eval(expr, envir, enclos) 28: eval_with_user_handlers(expr, envir, enclos, user_handlers) 29: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) 30: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) 31: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)) 32: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) 33: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, log_echo = log_echo, log_warning = log_warning, output_handler = output_handler, include_timing = include_timing) 34: evaluate::evaluate(...) 35: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 36: in_dir(input_dir(), expr) 37: 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))) 38: eng_r(options) 39: block_exec(params) 40: call_block(x) 41: process_group.block(group) 42: process_group(group) 43: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)) 44: withCallingHandlers(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)), error = function(e) { setwd(wd) write_utf8(res, output %n% stdout()) message("\nQuitting from lines ", paste(current_lines(i), collapse = "-"), if (labels[i] != "") sprintf(" [%s]", labels[i]), sprintf(" (%s)", knit_concord$get("infile"))) }) 45: process_file(text, output) 46: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 47: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 48: vweave_rmarkdown(...) 49: engine$weave(file, quiet = quiet, encoding = enc) 50: doTryCatch(return(expr), name, parentenv, handler) 51: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 52: tryCatchList(expr, classes, parentenv, handlers) 53: 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)))}) 54: tools:::.buildOneVignette("basic_usage.Rmd", "/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/var/folders/pk/n4bndnt1287ctrd_ftthnnnr0000gp/T//RtmphLLdC3/working_dir/RtmpjzOluD/file128b63c0c240b.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, enclos) 27: eval(expr, envir, enclos) 28: eval_with_user_handlers(expr, envir, enclos, user_handlers) 29: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) 30: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) 31: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)) 32: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) 33: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, log_echo = log_echo, log_warning = log_warning, output_handler = output_handler, include_timing = include_timing) 34: evaluate::evaluate(...) 35: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 36: in_dir(input_dir(), expr) 37: 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))) 38: eng_r(options) 39: block_exec(params) 40: call_block(x) 41: process_group.block(group) 42: process_group(group) 43: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)) 44: withCallingHandlers(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)), error = function(e) { setwd(wd) write_utf8(res, output %n% stdout()) message("\nQuitting from lines ", paste(current_lines(i), collapse = "-"), if (labels[i] != "") sprintf(" [%s]", labels[i]), sprintf(" (%s)", knit_concord$get("infile"))) }) 45: process_file(text, output) 46: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 47: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 48: vweave_rmarkdown(...) 49: engine$weave(file, quiet = quiet, encoding = enc) 50: doTryCatch(return(expr), name, parentenv, handler) 51: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 52: tryCatchList(expr, classes, parentenv, handlers) 53: 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)))}) 54: tools:::.buildOneVignette("basic_usage.Rmd", "/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "basic_usage", "UTF-8", "/var/folders/pk/n4bndnt1287ctrd_ftthnnnr0000gp/T//RtmphLLdC3/working_dir/RtmpjzOluD/file128b63c0c240b.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from lines 83-91 [unnamed-chunk-7] (basic_usage.Rmd) Error: processing vignette 'basic_usage.Rmd' failed with diagnostics: 'names' attribute [3] must be the same length as the vector [0] --- failed re-building ‘basic_usage.Rmd’ --- re-building ‘benchmark.Rmd’ using rmarkdown --- finished re-building ‘benchmark.Rmd’ --- re-building ‘convergence.Rmd’ using rmarkdown --- finished re-building ‘convergence.Rmd’ --- re-building ‘data_formatting.Rmd’ using rmarkdown --- finished re-building ‘data_formatting.Rmd’ --- re-building ‘interactions.Rmd’ using rmarkdown --- finished re-building ‘interactions.Rmd’ --- re-building ‘mnl_models.Rmd’ using rmarkdown *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: Traceback: 1: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar) 2: eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch({ result <- nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, tryCatchList(expr, classes, parentenv, handlers) 7: mi = mi, opts = mi$options)}, error = function(e) {}) 8: system.time({ model <- mi$modeltryCatch({ 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 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$status <- result$status model$message <- result$message }}) 9: FUN(X[[i]], ...) 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: lapply(X = S, FUN = FUN, ...) 11: doTryCatch(return(expr), name, parentenv, handler) 12: }) 9: FUN(X[[i]], ...) 10: lapply(X = S, FUN = FUN, ...) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: tryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) {11: doTryCatch(return(expr), name, parentenv, handler) 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13: 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 <- 75LtryCatchList(expr, classes, parentenv, handlers) 14: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) 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 ") call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] } 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: 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) suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart("muffleMessage")) 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")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))21: suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)) 22: withCallingHandlers(expr, message = function(c) if (inherits(c, 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, enclos) 27: eval(expr, envir, enclos) 28: eval_with_user_handlers(expr, envir, enclos, user_handlers) 29: classes)) tryInvokeRestart("muffleMessage")) 23: suppressMessages(suppressWarnings(parallel::mclapply(miList, runModel, mc.cores = numCores)))withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) 30: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) 31: 24: runMultistart(modelInputs) 25: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)) 32: logitr(data = yogurt, outcome = "choice", obsID = "obsID", pars = c("feat", "brand"), scalePar = "price", numMultiStarts = 10, startVals = wtp_mnl_pref$Estimate) 26: eval(expr, envir, enclos) timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) 33: 27: eval(expr, envir, enclos) 28: eval_with_user_handlers(expr, envir, enclos, user_handlers)evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, log_echo = log_echo, log_warning = log_warning, output_handler = output_handler, include_timing = include_timing) 29: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) 30: 34: evaluate::evaluate(...) 35: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (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)) withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) 31: 36: in_dir(input_dir(), expr) 37: 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))) 38: eng_r(options) 39: block_exec(params) 40: call_block(x)handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)) 32: 41: process_group.block(group) 42: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) 33: process_group(group) 43: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)) 44: withCallingHandlers(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)), error = function(e) { setwd(wd)evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, log_echo = log_echo, log_warning = log_warning, output_handler = output_handler, include_timing = include_timing) write_utf8(res, output %n% stdout()) message("\nQuitting from lines ", paste(current_lines(i), collapse = "-"), if (labels[i] != "") sprintf(" [%s]", labels[i]), sprintf(" (%s)", knit_concord$get("infile"))) }) 34: evaluate::evaluate(...) 35: 45: process_file(text, output) 46: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0Lknitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 47: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 48: vweave_rmarkdown(...) 49: engine$weave(file, quiet = quiet, encoding = enc) 50: doTryCatch(return(expr), name, parentenv, handler) 51: else 2L }, output_handler = knit_handlers(options$render, options)) 36: in_dir(input_dir(), expr) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 52: tryCatchList(expr, classes, parentenv, handlers) 37: 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 {53: 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) { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) 38: OK <<- FALSE message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})eng_r(options) 39: block_exec(params) 40: call_block(x) 41: process_group.block(group) 42: process_group(group) 43: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)) 44: withCallingHandlers(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)), error = function(e) { setwd(wd) write_utf8(res, output %n% stdout()) message("\nQuitting from lines ", paste(current_lines(i), collapse = "-"), if (labels[i] != "") 54: tools:::.buildOneVignette("mnl_models.Rmd", "/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/var/folders/pk/n4bndnt1287ctrd_ftthnnnr0000gp/T//RtmphLLdC3/working_dir/RtmpjzOluD/file128b614c9218e.rds") An irrecoverable exception occurred. R is aborting now ... sprintf(" [%s]", labels[i]), sprintf(" (%s)", knit_concord$get("infile"))) }) 45: process_file(text, output) 46: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 47: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 48: vweave_rmarkdown(...) 49: engine$weave(file, quiet = quiet, encoding = enc) 50: doTryCatch(return(expr), name, parentenv, handler) 51: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 52: tryCatchList(expr, classes, parentenv, handlers) 53: 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)))}) 54: tools:::.buildOneVignette("mnl_models.Rmd", "/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models", "UTF-8", "/var/folders/pk/n4bndnt1287ctrd_ftthnnnr0000gp/T//RtmphLLdC3/working_dir/RtmpjzOluD/file128b614c9218e.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from lines 86-98 [unnamed-chunk-9] (mnl_models.Rmd) 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, enclos) 27: eval(expr, envir, enclos) 28: eval_with_user_handlers(expr, envir, enclos, user_handlers) Traceback: 29: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) 30: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) 31: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, 1: message = mHandler)) 32: mi$logitFuncs$getMnlV(pars, d$X, d$scalePar)timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) 33: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, 2: log_echo = log_echo, log_warning = log_warning, output_handler = output_handler, eval_f(x0, ...) 3: nloptr::nloptr(x0 = mi$model$startVals, eval_f = mi$evalFuncs$objective, mi = mi, opts = mi$options) 4: doTryCatch(return(expr), name, parentenv, handler) 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, include_timing = include_timing) 34: evaluate::evaluate(...) 35: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 36: in_dir(input_dir(), expr) 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, enclos) 27: eval(expr, envir, enclos) 28: eval_with_user_handlers(expr, envir, enclos, user_handlers)37: 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 { 29: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) 30: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) 31: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)) 32: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) 33: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, log_echo = log_echo, log_warning = log_warning, output_handler = output_handler, include_timing = include_timing) 34: evaluate::evaluate(...) 35: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 36: in_dir(input_dir(), expr) 37: 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))) 38: eng_r(options) 39: block_exec(params) 40: call_block(x) 41: process_group.block(group) 42: process_group(group) 43: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)) 44: withCallingHandlers(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)), error = function(e) { setwd(wd) write_utf8(res, output %n% stdout()) message("\nQuitting from lines ", paste(current_lines(i), collapse = "-"), if (labels[i] != "") sprintf(" [%s]", labels[i]), sprintf(" (%s)", knit_concord$get("infile"))) }) 45: process_file(text, output) 46: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 47: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 48: vweave_rmarkdown(...) 49: if (options$error && options$include) 0L else 2Lengine$weave(file, quiet = quiet, encoding = enc) 50: doTryCatch(return(expr), name, parentenv, handler) }, output_handler = knit_handlers(options$render, options)))51: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 38: eng_r(options) 39: block_exec(params) 40: call_block(x) 41: process_group.block(group) 42: process_group(group) 43: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)) 44: withCallingHandlers(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)), error = function(e) { setwd(wd) write_utf8(res, output %n% stdout()) message("\nQuitting from lines ", paste(current_lines(i), collapse = "-"), if (labels[i] != "") sprintf(" [%s]", labels[i]), sprintf(" (%s)", knit_concord$get("infile"))) }) 52: tryCatchList(expr, classes, parentenv, handlers) 53: 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)))}) 54: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/var/folders/pk/n4bndnt1287ctrd_ftthnnnr0000gp/T//RtmphLLdC3/working_dir/RtmpjzOluD/file128b6d3f8628.rds") An irrecoverable exception occurred. R is aborting now ... 45: process_file(text, output) 46: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 47: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 48: vweave_rmarkdown(...) 49: engine$weave(file, quiet = quiet, encoding = enc) 50: doTryCatch(return(expr), name, parentenv, handler) 51: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 52: tryCatchList(expr, classes, parentenv, handlers) 53: 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)))}) 54: tools:::.buildOneVignette("mnl_models_weighted.Rmd", "/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "mnl_models_weighted", "UTF-8", "/var/folders/pk/n4bndnt1287ctrd_ftthnnnr0000gp/T//RtmphLLdC3/working_dir/RtmpjzOluD/file128b6d3f8628.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from lines 65-80 [unnamed-chunk-3] (mnl_models_weighted.Rmd) 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, enclos) 27: eval(expr, envir, enclos) 28: eval_with_user_handlers(expr, envir, enclos, user_handlers) 29: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) 30: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) 31: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)) 32: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) 33: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, log_echo = log_echo, log_warning = log_warning, output_handler = output_handler, include_timing = include_timing) 34: evaluate::evaluate(...) 35: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 36: in_dir(input_dir(), expr) 37: 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))) 38: eng_r(options) 39: block_exec(params) 40: call_block(x) 41: process_group.block(group) 42: process_group(group) 43: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)) 44: withCallingHandlers(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)), error = function(e) { setwd(wd) write_utf8(res, output %n% stdout()) message("\nQuitting from lines ", paste(current_lines(i), collapse = "-"), if (labels[i] != "") sprintf(" [%s]", labels[i]), sprintf(" (%s)", knit_concord$get("infile"))) }) 45: process_file(text, output) 46: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 47: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 48: vweave_rmarkdown(...) 49: engine$weave(file, quiet = quiet, encoding = enc) 50: doTryCatch(return(expr), name, parentenv, handler) 51: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 52: tryCatchList(expr, classes, parentenv, handlers) 53: 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)))}) 54: tools:::.buildOneVignette("predict.Rmd", "/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/var/folders/pk/n4bndnt1287ctrd_ftthnnnr0000gp/T//RtmphLLdC3/working_dir/RtmpjzOluD/file128b679b57a37.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, enclos) 27: eval(expr, envir, enclos) 28: eval_with_user_handlers(expr, envir, enclos, user_handlers) 29: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) 30: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) 31: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)) 32: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) 33: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, log_echo = log_echo, log_warning = log_warning, output_handler = output_handler, include_timing = include_timing) 34: evaluate::evaluate(...) 35: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) 36: in_dir(input_dir(), expr) 37: 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))) 38: eng_r(options) 39: block_exec(params) 40: call_block(x) 41: process_group.block(group) 42: process_group(group) 43: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)) 44: withCallingHandlers(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)), error = function(e) { setwd(wd) write_utf8(res, output %n% stdout()) message("\nQuitting from lines ", paste(current_lines(i), collapse = "-"), if (labels[i] != "") sprintf(" [%s]", labels[i]), sprintf(" (%s)", knit_concord$get("infile"))) }) 45: process_file(text, output) 46: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 47: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) 48: vweave_rmarkdown(...) 49: engine$weave(file, quiet = quiet, encoding = enc) 50: doTryCatch(return(expr), name, parentenv, handler) 51: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 52: tryCatchList(expr, classes, parentenv, handlers) 53: 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)))}) 54: tools:::.buildOneVignette("predict.Rmd", "/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck/vign_test/logitr", TRUE, FALSE, "predict", "UTF-8", "/var/folders/pk/n4bndnt1287ctrd_ftthnnnr0000gp/T//RtmphLLdC3/working_dir/RtmpjzOluD/file128b679b57a37.rds") An irrecoverable exception occurred. R is aborting now ... Quitting from lines 92-109 [unnamed-chunk-5] (predict.Rmd) 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 * checking PDF version of manual ... OK * checking HTML version of manual ... OK * checking for detritus in the temp directory ... OK * DONE Status: 2 ERRORs See ‘/Users/ripley/R/packages/tests-Accelerate/logitr.Rcheck/00check.log’ for details. 48.33 real 38.14 user 8.11 sys