CRAN Package Check Results for Package missSBM

Last updated on 2026-10-17 20:50:08 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 88.36 352.66 441.02 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 58.03 240.79 298.82 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 57.00 247.35 304.35 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 63.00 247.59 310.59 OK
r-devel-windows-x86_64 1.1.0 95.00 449.00 544.00 OK
r-patched-linux-x86_64 1.1.0 85.58 342.08 427.66 OK
r-release-linux-x86_64 1.1.0 74.39 345.64 420.03 OK
r-release-macos-arm64 1.1.0 17.00 92.00 109.00 OK
r-release-macos-x86_64 1.1.0 59.00 456.00 515.00 OK
r-release-windows-x86_64 1.1.0 98.00 358.00 456.00 OK
r-oldrel-macos-arm64 1.1.0 ERROR
r-oldrel-macos-x86_64 1.1.0 59.00 679.00 738.00 OK
r-oldrel-windows-x86_64 1.1.0 119.00 528.00 647.00 OK

Check Details

Version: 1.1.0
Check: tests
Result: ERROR Running ‘spelling.R’ [0s/0s] Running ‘testthat.R’ [38s/31s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(missSBM) > > test_check("missSBM") Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'covar-dyad' network-sampling process iteration #: 2 iteration #: 3 Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'dyad' network-sampling process iteration #: 2 iteration #: 3 Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'covar-node' network-sampling process iteration #: 2 iteration #: 3 iteration #: 4 iteration #: 5 Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'node' network-sampling process iteration #: 2 iteration #: 3 iteration #: 4 Tested sampling: - dyad - node - double-standard - block-node - block-dyad Adjusting Variational EM for Stochastic Block Model Imputation assumes a 'dyad' network-sampling process Initialization of 3 model(s). Tested sampling: - dyad - node - double-standard - block-node - block-dyad - degreeTested sampling: - dyad - node - double-standard - block-node - block-dyad - degree sampling: dyad new better on connectivity node double-standard block-node new better on mixture Adjusting Variational EM for Stochastic Block Model iteration #: 2 iteration #: 3 iteration #: 4 iteration #: 5 iteration #: 6 iteration #: 7 iteration #: 8 iteration #: 9 iteration #: 10 iteration #: 11 iteration #: 12 iteration #: 13 iteration #: 14 iteration #: 15 iteration #: 16 iteration #: 17 iteration #: 18 iteration #: 19 iteration #: 20 iteration #: 21 iteration #: 22 iteration #: 23 iteration #: 24 iteration #: 25 iteration #: 26 iteration #: 27 iteration #: 28 iteration #: 29 iteration #: 30 iteration #: 31 iteration #: 32 iteration #: 33 iteration #: 34 Adjusting Variational EM for Stochastic Block Model Dyads are distributed according to a 'undirected' SBM. Imputation assumes a 'node' network-sampling process iteration #: 2 iteration #: 3 iteration #: 4 iteration #: 5 iteration #: 6 iteration #: 7 iteration #: 8 iteration #: 9 iteration #: 10 iteration #: 11 iteration #: 12 iteration #: 13 iteration #: 14 iteration #: 15 iteration #: 16 iteration #: 17 iteration #: 18 iteration #: 19 iteration #: 20 iteration #: 21 iteration #: 22 iteration #: 23 iteration #: 24 iteration #: 25 iteration #: 26 iteration #: 27 iteration #: 28 iteration #: 29 iteration #: 30 iteration #: 31 iteration #: 32 iteration #: 33 iteration #: 34 Adjusting Variational EM for Stochastic Block Model Imputation assumes a 'node' network-sampling process Initialization of 1 model(s). Performing VEM inference Model with 3 blocks. Adjusting Variational EM for Stochastic Block Model Imputation assumes a 'dyad' network-sampling process Initialization of 2 model(s). Performing VEM inference Model with 2 blocks. Model with 1 blocks. Polishing (node-swap) Looking for better solutions Pass 1 Going forward + Pass 1 Going backward + *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 2: FUN(X[[i]], ...) 3: 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) 7: 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))}) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 10: FUN(X[[i]], ...) 11: lapply(seq_len(cores), inner.do) 12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) 14: .self$do_with_inits(inits, Q, reinitialization_effort) 15: .self$estim_ascend(reinitialization_effort, changing_effort) 16: private$BMobject$estimate() 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 18: eval(code, test_env) 19: eval(code, test_env) 20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) 21: doTryCatch(return(expr), name, parentenv, handler) 22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 23: tryCatchList(expr, classes, parentenv, handlers) 24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 25: doWithOneRestart(return(expr), restart) 26: withOneRestart(expr, restarts[[1L]]) 27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { }) 28: test_code(code, parent.frame()) 29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", { sampler_undirected_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) }) 30: eval(code, test_env) 31: eval(code, test_env) 32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) 33: doTryCatch(return(expr), name, parentenv, handler) 34: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 35: tryCatchList(expr, classes, parentenv, handlers) 36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 37: doWithOneRestart(return(expr), restart) Traceback: 1: 38: withOneRestart(expr, restarts[[1L]])dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)39: withRestarts(tryCatch(withCallingHandlers({ 2: eval(code, test_env)FUN(X[[i]], ...) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 3: lapply(X = S, FUN = FUN, ...) skip("On CRAN") } else if (!new_expectations && skip_on_empty) { 4: skip_empty()doTryCatch(return(expr), name, parentenv, handler) } }, expectation = handle_expectation, packageNotFoundError = function(e) { 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } 6: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 7: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(expr, error = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), call <- conditionCall(e) end_test = function() { if (!is.null(call)) { }) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)40: test_code(code = exprs, env = env, reporter = get_reporter() %||% dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") StopReporter$new()) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]41: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")source_file(path, env = env(env), desc = desc, shuffle = shuffle, if (is.na(w)) error_call = error_call) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")42: if (w > LONG) FUN(X[[i]], ...) prefix <- paste0(prefix, "\n ") }43: else prefix <- "Error : "lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, msg <- paste0(prefix, conditionMessage(e), "\n") error_call = error_call) .Internal(seterrmessage(msg[1L]))44: if (!silent && isTRUE(getOption("show.error.messages"))) {doTryCatch(return(expr), name, parentenv, handler) cat(msg, file = outFile) .Internal(printDeferredWarnings())45: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) invisible(structure(msg, class = "try-error", condition = e)) })46: tryCatchList(expr, classes, parentenv, handlers) 8: 47: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") 9: NULLsendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) })10: FUN(X[[i]], ...)48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 11: lapply(seq_len(cores), inner.do) env = env, desc = desc, shuffle = shuffle, error_call = error_call)) 12: 49: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, test_files_serial(test_dir = test_dir, test_package = test_package, mc.silent = TRUE) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, verbose = (verbosity > 4)) desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)14: .self$do_with_inits(inits, Q, reinitialization_effort) 50: 15: .self$estim_ascend(reinitialization_effort, changing_effort)test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, 16: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)private$BMobject$estimate() 51: 17: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 18: 52: eval(code, test_env)test_check("missSBM") 19: eval(code, test_env) An irrecoverable exception occurred. R is aborting now ... 20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) 21: doTryCatch(return(expr), name, parentenv, handler) 22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 23: tryCatchList(expr, classes, parentenv, handlers) 24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 25: doWithOneRestart(return(expr), restart) 26: withOneRestart(expr, restarts[[1L]]) 27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { }) 28: test_code(code, parent.frame()) 29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", { sampler_undirected_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) }) 30: eval(code, test_env) 31: eval(code, test_env) 32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) 33: doTryCatch(return(expr), name, parentenv, handler) 34: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 35: tryCatchList(expr, classes, parentenv, handlers) 36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 37: doWithOneRestart(return(expr), restart) 38: withOneRestart(expr, restarts[[1L]]) 39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { }) 40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) 41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) 42: FUN(X[[i]], ...) 43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call) 44: doTryCatch(return(expr), name, parentenv, handler) 45: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 46: tryCatchList(expr, classes, parentenv, handlers) 47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL}) 48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) 49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call) 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle) 51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") 52: test_check("missSBM") An irrecoverable exception occurred. R is aborting now ... Saving _problems/test-sbm-bernoulli-with-covariates-16.R *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 2: FUN(X[[i]], ...) 3: 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) 7: 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) Traceback: prefix <- paste0(prefix, "\n ") 1: }dispatcher(membership_name, membership_init$to_cc(), model_name, else prefix <- "Error : " .self$network_to_cc(), TRUE) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) 2: if (!silent && isTRUE(getOption("show.error.messages"))) {FUN(X[[i]], ...) cat(msg, file = outFile) .Internal(printDeferredWarnings()) 3: } invisible(structure(msg, class = "try-error", condition = e))lapply(X = S, FUN = FUN, ...)}) 4: doTryCatch(return(expr), name, parentenv, handler) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 5: 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 6: 10: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...) 7: 11: tryCatch(expr, error = function(e) {lapply(seq_len(cores), inner.do) call <- conditionCall(e) 12: if (!is.null(call)) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, if (identical(call[[1L]], quote(doTryCatch))) mc.silent = TRUE) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)13: prefix <- paste("Error in", dcall, ": ")parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, LONG <- 75L verbose = (verbosity > 4)) sm <- strsplit(conditionMessage(e), "\n")[[1L]]14: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w").self$do_with_inits(inits, Q, reinitialization_effort) if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")15: .self$estim_ascend(reinitialization_effort, changing_effort) if (w > LONG) 16: prefix <- paste0(prefix, "\n ")private$BMobject$estimate() } 17: else prefix <- "Error : "mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) {18: cat(msg, file = outFile)eval(code, test_env) .Internal(printDeferredWarnings()) }19: invisible(structure(msg, class = "try-error", condition = e))eval(code, test_env)}) 20: withCallingHandlers({ 8: eval(code, test_env)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") 9: }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) else if (!new_expectations && skip_on_empty) { skip_empty() }10: FUN(X[[i]], ...)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {11: skip(paste0("{", e$package, "} is not installed.")) }lapply(seq_len(cores), inner.do)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE12: invokeRestart("muffle_cran_snapshot")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }, skip = handle_skip, warning = handle_warning, message = handle_message, mc.silent = TRUE) error = handle_error, interrupt = handle_interrupt) 21: 13: doTryCatch(return(expr), name, parentenv, handler) parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 22: verbose = (verbosity > 4))tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14: 23: .self$do_with_inits(inits, Q, reinitialization_effort) tryCatchList(expr, classes, parentenv, handlers) 15: 24: .self$estim_ascend(reinitialization_effort, changing_effort) tryCatch(withCallingHandlers({ eval(code, test_env)16: new_expectations <- the$test_expectations > starting_expectationsprivate$BMobject$estimate() if (snapshot_skipped) { skip("On CRAN")17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) else if (!new_expectations && skip_on_empty) { skip_empty()18: }eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {19: skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) } }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE20: invokeRestart("muffle_cran_snapshot")withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN")25: }doWithOneRestart(return(expr), restart) else if (!new_expectations && skip_on_empty) {26: skip_empty()withOneRestart(expr, restarts[[1L]]) } }, expectation = handle_expectation, packageNotFoundError = function(e) {27: if (on_cran()) {withRestarts(tryCatch(withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt) else if (!new_expectations && skip_on_empty) { skip_empty() }21: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))22: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE23: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {24: })tryCatch(withCallingHandlers({ eval(code, test_env)28: new_expectations <- the$test_expectations > starting_expectationstest_code(code, parent.frame()) if (snapshot_skipped) { skip("On CRAN")29: }test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { else if (!new_expectations && skip_on_empty) { sampler_directed_cov$rNetwork(store = TRUE) skip_empty() mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, } "bernoulli", TRUE, covarList = covarList_directed)}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, if (on_cran()) { plot = FALSE)) skip(paste0("{", e$package, "} is not installed.")) } mySBM_sbm$setModel(Q)}, snapshot_on_cran = function(cnd) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, snapshot_skipped <<- TRUE covariates = covarList_directed) invokeRestart("muffle_cran_snapshot") cls <- net$clustering(1:(2 * Q))}, skip = handle_skip, warning = handle_warning, message = handle_message, cl <- cls[[Q]] error = handle_error, interrupt = handle_interrupt), error = handle_fatal) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed)25: mySBM_missSBM$doVEM(trace = TRUE)doWithOneRestart(return(expr), restart) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1)26: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), withOneRestart(expr, restarts[[1L]]) 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 27: 0.05)withRestarts(tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 0.1) if (snapshot_skipped) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), skip("On CRAN") 0.85) } }) else if (!new_expectations && skip_on_empty) {30: skip_empty()eval(code, test_env) }31: }, expectation = handle_expectation, packageNotFoundError = function(e) {eval(code, test_env) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))32: }withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip("On CRAN") end_test = function() { } }) else if (!new_expectations && skip_on_empty) { skip_empty() }28: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_code(code, parent.frame()) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", }}, snapshot_on_cran = function(cnd) { { snapshot_skipped <<- TRUE sampler_directed_cov$rNetwork(store = TRUE) invokeRestart("muffle_cran_snapshot") mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, }, skip = handle_skip, warning = handle_warning, message = handle_message, "bernoulli", TRUE, covarList = covarList_directed) error = handle_error, interrupt = handle_interrupt) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))33: mySBM_sbm$setModel(Q)doTryCatch(return(expr), name, parentenv, handler) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed)34: cls <- net$clustering(1:(2 * Q))tryCatchOne(expr, names, parentenv, handlers[[1L]]) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 35: clusterInit = cl, covarList = covarList_directed)tryCatchList(expr, classes, parentenv, handlers) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1)36: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), tryCatch(withCallingHandlers({ 0.8) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), new_expectations <- the$test_expectations > starting_expectations 0.05) if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), skip("On CRAN") 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), else if (!new_expectations && skip_on_empty) { 0.85) skip_empty() }) } }, expectation = handle_expectation, packageNotFoundError = function(e) {30: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) {31: snapshot_skipped <<- TRUEeval(code, test_env) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 32: error = handle_error, interrupt = handle_interrupt), error = handle_fatal) withCallingHandlers({37: eval(code, test_env)doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN")38: }withOneRestart(expr, restarts[[1L]]) else if (!new_expectations && skip_on_empty) { skip_empty() }39: withRestarts(tryCatch(withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt) } }, expectation = handle_expectation, packageNotFoundError = function(e) {33: if (on_cran()) {doTryCatch(return(expr), name, parentenv, handler) skip(paste0("{", e$package, "} is not installed.")) }34: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")35: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 36: end_test = function() {tryCatch(withCallingHandlers({ }) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations40: if (snapshot_skipped) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip("On CRAN") } StopReporter$new()) else if (!new_expectations && skip_on_empty) { skip_empty()41: }}, expectation = handle_expectation, packageNotFoundError = function(e) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, if (on_cran()) { error_call = error_call) skip(paste0("{", e$package, "} is not installed.")) }42: }, snapshot_on_cran = function(cnd) {FUN(X[[i]], ...) snapshot_skipped <<- TRUE 43: invokeRestart("muffle_cran_snapshot")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) error_call = error_call) 37: 44: doWithOneRestart(return(expr), restart)doTryCatch(return(expr), name, parentenv, handler) 38: 45: withOneRestart(expr, restarts[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]]) 39: 46: withRestarts(tryCatch(withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {47: tryCatch(code, testthat_abort_reporter = function(cnd) { skip("On CRAN") cat(conditionMessage(cnd), "\n") } NULL else if (!new_expectations && skip_on_empty) {}) skip_empty() }48: }, expectation = handle_expectation, packageNotFoundError = function(e) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, if (on_cran()) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) skip(paste0("{", e$package, "} is not installed.")) }49: }, snapshot_on_cran = function(cnd) {test_files_serial(test_dir = test_dir, test_package = test_package, snapshot_skipped <<- TRUE test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, invokeRestart("muffle_cran_snapshot") desc = desc, load_package = load_package, shuffle = shuffle, }, skip = handle_skip, warning = handle_warning, message = handle_message, error_call = error_call) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {50: })test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 40: load_package = load_package, parallel = parallel, shuffle = shuffle)test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())51: test_dir("testthat", package = package, reporter = reporter, 41: ..., load_package = "installed")source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) 52: 42: test_check("missSBM")FUN(X[[i]], ...) An irrecoverable exception occurred. R is aborting now ... 43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call) 44: doTryCatch(return(expr), name, parentenv, handler) 45: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 46: tryCatchList(expr, classes, parentenv, handlers) 47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL}) 48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) 49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call) 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle) 51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") 52: test_check("missSBM") An irrecoverable exception occurred. R is aborting now ... Saving _problems/test-sbm-bernoulli-with-covariates-46.R *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 2: FUN(X[[i]], ...) 3: Traceback: lapply(X = S, FUN = FUN, ...) 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 4: doTryCatch(return(expr), name, parentenv, handler) 2: FUN(X[[i]], ...) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 3: lapply(X = S, FUN = FUN, ...) 6: tryCatchList(expr, classes, parentenv, handlers) 4: 7: doTryCatch(return(expr), name, parentenv, handler)tryCatch(expr, error = function(e) { call <- conditionCall(e) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (!is.null(call)) { 6: if (identical(call[[1L]], quote(doTryCatch))) tryCatchList(expr, classes, parentenv, handlers) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) 7: prefix <- paste("Error in", dcall, ": ")tryCatch(expr, error = function(e) { LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] call <- conditionCall(e) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (!is.null(call)) { if (is.na(w)) if (identical(call[[1L]], quote(doTryCatch))) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], call <- sys.call(-4L) type = "b") dcall <- deparse(call, nlines = 1L) if (w > LONG) prefix <- paste("Error in", dcall, ": ") prefix <- paste0(prefix, "\n ") LONG <- 75L } sm <- strsplit(conditionMessage(e), "\n")[[1L]] else prefix <- "Error : " w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") msg <- paste0(prefix, conditionMessage(e), "\n") if (is.na(w)) .Internal(seterrmessage(msg[1L])) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (!silent && isTRUE(getOption("show.error.messages"))) { type = "b") cat(msg, file = outFile) if (w > LONG) prefix <- paste0(prefix, "\n ") .Internal(printDeferredWarnings()) } } else prefix <- "Error : " invisible(structure(msg, class = "try-error", condition = e)) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))}) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) 8: }try(lapply(X = S, FUN = FUN, ...), silent = TRUE) invisible(structure(msg, class = "try-error", condition = e)) }) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)10: FUN(X[[i]], ...) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))11: lapply(seq_len(cores), inner.do) 10: 12: FUN(X[[i]], ...)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)11: lapply(seq_len(cores), inner.do)13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 12: verbose = (verbosity > 4)) parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 14: mc.silent = TRUE).self$do_with_inits(inits, Q, reinitialization_effort) 13: 15: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, .self$estim_ascend(reinitialization_effort, changing_effort) verbose = (verbosity > 4)) 16: 14: private$BMobject$estimate().self$do_with_inits(inits, Q, reinitialization_effort) 17: 15: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)).self$estim_ascend(reinitialization_effort, changing_effort) 18: 16: eval(code, test_env)private$BMobject$estimate() 19: 17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 20: 18: withCallingHandlers({eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations19: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN") }20: else if (!new_expectations && skip_on_empty) {withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt) skip(paste0("{", e$package, "} is not installed.")) }21: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")22: }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 21: 23: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers) 22: 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(withCallingHandlers({ eval(code, test_env)23: new_expectations <- the$test_expectations > starting_expectationstryCatchList(expr, classes, parentenv, handlers) if (snapshot_skipped) { skip("On CRAN")24: }tryCatch(withCallingHandlers({ else if (!new_expectations && skip_on_empty) { eval(code, test_env) skip_empty() new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { } skip_empty()}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, expectation = handle_expectation, packageNotFoundError = function(e) { invokeRestart("muffle_cran_snapshot") if (on_cran()) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) } }, snapshot_on_cran = function(cnd) {25: snapshot_skipped <<- TRUEdoWithOneRestart(return(expr), restart) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 26: withOneRestart(expr, restarts[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 27: withRestarts(tryCatch(withCallingHandlers({25: eval(code, test_env)doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {26: skip("On CRAN")withOneRestart(expr, restarts[[1L]]) } else if (!new_expectations && skip_on_empty) {27: skip_empty()withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { snapshot_skipped <<- TRUE skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (on_cran()) { end_test = function() { skip(paste0("{", e$package, "} is not installed.")) }) } 28: test_code(code, parent.frame())}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE29: invokeRestart("muffle_cran_snapshot")test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", }, skip = handle_skip, warning = handle_warning, message = handle_message, { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), sampler_undirected_nocov$rNetwork(store = TRUE) end_test = function() { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, }) "bernoulli", FALSE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 28: plot = FALSE))test_code(code, parent.frame()) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)29: cl <- net$clustering(3)[[1]]test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, { clusterInit = cl) sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_missSBM$doVEM() mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), "bernoulli", FALSE) 0.05) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), plot = FALSE)) 0.95) mySBM_sbm$setModel(3) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) 0.01) cl <- net$clustering(3)[[1]] expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl) 0.05) mySBM_missSBM$doVEM() expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.95) }) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95)30: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), eval(code, test_env) 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 31: 0.05)eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95)32: })withCallingHandlers({ eval(code, test_env)30: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) { skip("On CRAN")31: }eval(code, test_env) else if (!new_expectations && skip_on_empty) { skip_empty()32: }withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {33: skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler) } }, snapshot_on_cran = function(cnd) {34: snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 35: error = handle_error, interrupt = handle_interrupt)tryCatchList(expr, classes, parentenv, handlers) 33: 36: doTryCatch(return(expr), name, parentenv, handler)tryCatch(withCallingHandlers({ eval(code, test_env)34: new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) { skip("On CRAN")35: }tryCatchList(expr, classes, parentenv, handlers) else if (!new_expectations && skip_on_empty) { skip_empty()36: }tryCatch(withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {37: skip(paste0("{", e$package, "} is not installed."))doWithOneRestart(return(expr), restart) } }, snapshot_on_cran = function(cnd) {38: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")withOneRestart(expr, restarts[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)39: withRestarts(tryCatch(withCallingHandlers({37: eval(code, test_env)doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations 38: withOneRestart(expr, restarts[[1L]]) if (snapshot_skipped) { 39: skip("On CRAN")withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, snapshot_on_cran = function(cnd) { end_test = function() { snapshot_skipped <<- TRUE }) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 40: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_code(code = exprs, env = env, reporter = get_reporter() %||% end_test = function() { StopReporter$new()) }) 41: 40: source_file(path, env = env(env), desc = desc, shuffle = shuffle, test_code(code = exprs, env = env, reporter = get_reporter() %||% error_call = error_call) StopReporter$new()) 42: 41: FUN(X[[i]], ...)source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 42: error_call = error_call)FUN(X[[i]], ...) 44: 43: doTryCatch(return(expr), name, parentenv, handler)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)45: tryCatchOne(expr, names, parentenv, handlers[[1L]])44: doTryCatch(return(expr), name, parentenv, handler) 46: tryCatchList(expr, classes, parentenv, handlers)45: tryCatchOne(expr, names, parentenv, handlers[[1L]])47: tryCatch(code, testthat_abort_reporter = function(cnd) {46: cat(conditionMessage(cnd), "\n")tryCatchList(expr, classes, parentenv, handlers) NULL })47: tryCatch(code, testthat_abort_reporter = function(cnd) {48: cat(conditionMessage(cnd), "\n")with_reporter(reporters$multi, lapply(test_paths, test_one_file, NULL env = env, desc = desc, shuffle = shuffle, error_call = error_call))}) 49: 48: test_files_serial(test_dir = test_dir, test_package = test_package, with_reporter(reporters$multi, lapply(test_paths, test_one_file, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, 49: error_call = error_call)test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 50: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_files(test_dir = path, test_paths = test_paths, test_package = package, desc = desc, load_package = load_package, shuffle = shuffle, reporter = reporter, load_helpers = load_helpers, env = env, error_call = error_call) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)50: test_files(test_dir = path, test_paths = test_paths, test_package = package, 51: reporter = reporter, load_helpers = load_helpers, env = env, test_dir("testthat", package = package, reporter = reporter, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, ..., load_package = "installed") load_package = load_package, parallel = parallel, shuffle = shuffle) 52: 51: test_check("missSBM")test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")An irrecoverable exception occurred. R is aborting now ... 52: test_check("missSBM") An irrecoverable exception occurred. R is aborting now ... Saving _problems/test-sbm-bernoulli-without-covariate-16.R *** caught segfault *** address 0x110, cause 'invalid permissions' *** caught segfault *** address 0x110, cause 'invalid permissions' Traceback: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, Traceback: .self$network_to_cc(), TRUE) 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) 2: FUN(X[[i]], ...) 2: 3: FUN(X[[i]], ...)lapply(X = S, FUN = FUN, ...) 3: 4: lapply(X = S, FUN = FUN, ...)doTryCatch(return(expr), name, parentenv, handler) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch(expr, error = function(e) { 7: call <- conditionCall(e)tryCatch(expr, error = function(e) { if (!is.null(call)) { call <- conditionCall(e) if (identical(call[[1L]], quote(doTryCatch))) if (!is.null(call)) { call <- sys.call(-4L) if (identical(call[[1L]], quote(doTryCatch))) dcall <- deparse(call, nlines = 1L) call <- sys.call(-4L) prefix <- paste("Error in", dcall, ": ") dcall <- deparse(call, nlines = 1L) LONG <- 75L prefix <- paste("Error in", dcall, ": ") sm <- strsplit(conditionMessage(e), "\n")[[1L]] LONG <- 75L w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (is.na(w)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (is.na(w)) type = "b") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (w > LONG) prefix <- paste0(prefix, "\n ") type = "b") } if (w > LONG) else prefix <- "Error : " prefix <- paste0(prefix, "\n ") msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) else prefix <- "Error : " if (!silent && isTRUE(getOption("show.error.messages"))) { msg <- paste0(prefix, conditionMessage(e), "\n") cat(msg, file = outFile) .Internal(printDeferredWarnings()) .Internal(seterrmessage(msg[1L])) } if (!silent && isTRUE(getOption("show.error.messages"))) { invisible(structure(msg, class = "try-error", condition = e)) cat(msg, file = outFile)}) .Internal(printDeferredWarnings()) 8: }try(lapply(X = S, FUN = FUN, ...), silent = TRUE) invisible(structure(msg, class = "try-error", condition = e)) 9: })sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 8: 10: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) FUN(X[[i]], ...) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))11: lapply(seq_len(cores), inner.do)10: FUN(X[[i]], ...)12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 11: mc.silent = TRUE)lapply(seq_len(cores), inner.do) 12: 13: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, mc.silent = TRUE) verbose = (verbosity > 4))13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 14: verbose = (verbosity > 4)).self$do_with_inits(inits, Q, reinitialization_effort) 14: 15: .self$do_with_inits(inits, Q, reinitialization_effort).self$estim_ascend(reinitialization_effort, changing_effort) 15: 16: .self$estim_ascend(reinitialization_effort, changing_effort)private$BMobject$estimate() 17: 16: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))private$BMobject$estimate() 18: 17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 19: 18: eval(code, test_env)eval(code, test_env) 20: 19: withCallingHandlers({eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations20: if (snapshot_skipped) {withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, snapshot_on_cran = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, snapshot_skipped <<- TRUE error = handle_error, interrupt = handle_interrupt) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 21: error = handle_error, interrupt = handle_interrupt)doTryCatch(return(expr), name, parentenv, handler) 21: 22: doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 22: 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchList(expr, classes, parentenv, handlers) 23: tryCatchList(expr, classes, parentenv, handlers)24: tryCatch(withCallingHandlers({24: eval(code, test_env)tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { }}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)25: doWithOneRestart(return(expr), restart)25: 26: doWithOneRestart(return(expr), restart)withOneRestart(expr, restarts[[1L]]) 26: 27: withOneRestart(expr, restarts[[1L]])withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)27: new_expectations <- the$test_expectations > starting_expectationswithRestarts(tryCatch(withCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) skip("On CRAN") new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else if (!new_expectations && skip_on_empty) { skip("On CRAN") skip_empty() } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, snapshot_on_cran = function(cnd) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), snapshot_skipped <<- TRUE end_test = function() { invokeRestart("muffle_cran_snapshot") })}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 28: end_test = function() {test_code(code, parent.frame()) }) 29: 28: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", test_code(code, parent.frame()) { sampler_directed_nocov$rNetwork(store = TRUE)29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, { sampler_directed_nocov$rNetwork(store = TRUE) "bernoulli", TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, "bernoulli", TRUE) plot = FALSE)) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) clusterInit = cl) mySBM_missSBM$doVEM() mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.1) 0.2) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.2) 0.95) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), }) 0.95) })30: eval(code, test_env)30: eval(code, test_env)31: eval(code, test_env)31: eval(code, test_env)32: 32: withCallingHandlers({ eval(code, test_env)withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) error = handle_error, interrupt = handle_interrupt) 33: 33: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler) 34: 34: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]]) 35: 35: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers) 36: 36: tryCatch(withCallingHandlers({tryCatch(withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 37: doWithOneRestart(return(expr), restart)37: doWithOneRestart(return(expr), restart)38: withOneRestart(expr, restarts[[1L]])38: withOneRestart(expr, restarts[[1L]])39: withRestarts(tryCatch(withCallingHandlers({39: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }) end_test = function() { })40: test_code(code = exprs, env = env, reporter = get_reporter() %||% 40: StopReporter$new())test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)42: FUN(X[[i]], ...)42: 43: FUN(X[[i]], ...)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call) 43: 44: doTryCatch(return(expr), name, parentenv, handler)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 45: error_call = error_call)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 44: 46: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers) 45: 47: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n")46: NULLtryCatchList(expr, classes, parentenv, handlers)}) 48: 47: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n")49: NULLtest_files_serial(test_dir = test_dir, test_package = test_package, }) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 48: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, with_reporter(reporters$multi, lapply(test_paths, test_one_file, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call) env = env, desc = desc, shuffle = shuffle, error_call = error_call)) 50: 49: test_files(test_dir = path, test_paths = test_paths, test_package = package, test_files_serial(test_dir = test_dir, test_package = test_package, reporter = reporter, load_helpers = load_helpers, env = env, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, load_package = load_package, parallel = parallel, shuffle = shuffle) error_call = error_call) 51: 50: test_dir("testthat", package = package, reporter = reporter, test_files(test_dir = path, test_paths = test_paths, test_package = package, ..., load_package = "installed") reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 52: load_package = load_package, parallel = parallel, shuffle = shuffle)test_check("missSBM") 51: An irrecoverable exception occurred. R is aborting now ... test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") 52: test_check("missSBM") An irrecoverable exception occurred. R is aborting now ... Saving _problems/test-sbm-bernoulli-without-covariate-44.R [ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • On CRAN (3): 'test-explore-block-count.R:4:3', 'test-missSBM_collection-degenerate.R:80:3', 'test-missSBM_collection-estimate_chain.R:64:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-sbm-bernoulli-with-covariates.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, one covariate ── Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL") Backtrace: ▆ 1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:16:3 2. │ └─private$BMobject$estimate() 3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort) 4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort) 5. │ └─base::sapply(...) 6. │ └─base::lapply(X = X, FUN = FUN, ...) 7. │ └─blockmodels (local) FUN(X[[i]], ...) 8. │ └─getRefClass(membership_name)(from_cc = r$membership) 9. │ └─methods::new(`<chr>`, ...) 10. │ ├─methods::initialize(value, ...) 11. │ └─methods::initialize(value, ...) 12. │ └─.Object$initialize(...) 13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL)) 14. └─methods:::.setDummyField(...) ── Error ('test-sbm-bernoulli-with-covariates.R:46:3'): SimpleSBM_fit 'Bernoulli' model, directed, one covariate ── Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL") Backtrace: ▆ 1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:46:3 2. │ └─private$BMobject$estimate() 3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort) 4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort) 5. │ └─base::sapply(...) 6. │ └─base::lapply(X = X, FUN = FUN, ...) 7. │ └─blockmodels (local) FUN(X[[i]], ...) 8. │ └─getRefClass(membership_name)(from_cc = r$membership) 9. │ └─methods::new(`<chr>`, ...) 10. │ ├─methods::initialize(value, ...) 11. │ └─methods::initialize(value, ...) 12. │ └─.Object$initialize(...) 13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL)) 14. └─methods:::.setDummyField(...) ── Error ('test-sbm-bernoulli-without-covariate.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, no covariate ── Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL") Backtrace: ▆ 1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:16:3 2. │ └─private$BMobject$estimate() 3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort) 4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort) 5. │ └─base::sapply(...) 6. │ └─base::lapply(X = X, FUN = FUN, ...) 7. │ └─blockmodels (local) FUN(X[[i]], ...) 8. │ └─getRefClass(membership_name)(from_cc = r$membership) 9. │ └─methods::new(`<chr>`, ...) 10. │ ├─methods::initialize(value, ...) 11. │ └─methods::initialize(value, ...) 12. │ └─.Object$initialize(...) 13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL)) 14. └─methods:::.setDummyField(...) ── Error ('test-sbm-bernoulli-without-covariate.R:44:3'): SimpleSBM_fit 'Bernoulli' model, directed, no covariate ── Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL") Backtrace: ▆ 1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:44:3 2. │ └─private$BMobject$estimate() 3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort) 4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort) 5. │ └─base::sapply(...) 6. │ └─base::lapply(X = X, FUN = FUN, ...) 7. │ └─blockmodels (local) FUN(X[[i]], ...) 8. │ └─getRefClass(membership_name)(from_cc = r$membership) 9. │ └─methods::new(`<chr>`, ...) 10. │ ├─methods::initialize(value, ...) 11. │ └─methods::initialize(value, ...) 12. │ └─.Object$initialize(...) 13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL)) 14. └─methods:::.setDummyField(...) [ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ] Error: ! Test failures. Execution halted Flavor: r-oldrel-macos-arm64