CRAN Package Check Results for Package missSBM

Last updated on 2026-11-08 01:51:29 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 83.53 339.15 422.68 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 59.78 228.81 288.59 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 57.00 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 64.00 239.38 303.38 OK
r-devel-windows-x86_64 1.1.0 91.00 417.00 508.00 OK
r-patched-linux-x86_64 1.1.0 OK
r-release-linux-x86_64 1.1.0 78.27 331.21 409.48 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 101.00 348.00 449.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 118.00 480.00 598.00 OK

Check Details

Version: 1.1.0
Check: tests
Result: ERROR Running ‘spelling.R’ [0s/0s] Running ‘testthat.R’ [34s/33s] 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") } Traceback: else if (!new_expectations && skip_on_empty) { 1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) skip_empty() 2: }FUN(X[[i]], ...)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { 3: skip(paste0("{", e$package, "} is not installed."))lapply(X = S, FUN = FUN, ...) } }, snapshot_on_cran = function(cnd) { 4: snapshot_skipped <<- TRUEdoTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])37: doWithOneRestart(return(expr), restart) 6: tryCatchList(expr, classes, parentenv, handlers)38: withOneRestart(expr, restarts[[1L]]) 7: 39: withRestarts(tryCatch(withCallingHandlers({tryCatch(expr, error = function(e) { eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { call <- conditionCall(e) skip("On CRAN") } if (!is.null(call)) { else if (!new_expectations && skip_on_empty) { if (identical(call[[1L]], quote(doTryCatch))) skip_empty() call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ")}, expectation = handle_expectation, packageNotFoundError = function(e) { LONG <- 75L if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}, snapshot_on_cran = function(cnd) { if (is.na(w)) snapshot_skipped <<- TRUE w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], invokeRestart("muffle_cran_snapshot") type = "b")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (w > LONG) prefix <- paste0(prefix, "\n ") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() { else prefix <- "Error : " }) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))40: if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) .Internal(printDeferredWarnings()) }41: invisible(structure(msg, class = "try-error", condition = e))source_file(path, env = env(env), desc = desc, shuffle = shuffle, }) error_call = error_call) 8: 42: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) FUN(X[[i]], ...) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))43: 10: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, FUN(X[[i]], ...) error_call = error_call) 11: 44: lapply(seq_len(cores), inner.do)doTryCatch(return(expr), name, parentenv, handler) 12: 45: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, tryCatchOne(expr, names, parentenv, handlers[[1L]]) mc.silent = TRUE) 13: 46: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, tryCatchList(expr, classes, parentenv, handlers) verbose = (verbosity > 4)) 14: 47: .self$do_with_inits(inits, Q, reinitialization_effort)tryCatch(code, testthat_abort_reporter = function(cnd) { 15: .self$estim_ascend(reinitialization_effort, changing_effort) cat(conditionMessage(cnd), "\n") NULL16: })private$BMobject$estimate() 17: 48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) env = env, desc = desc, shuffle = shuffle, error_call = error_call))18: eval(code, test_env) 49: 19: eval(code, test_env)test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 20: withCallingHandlers({ env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, eval(code, test_env) error_call = error_call) new_expectations <- the$test_expectations > starting_expectations50: test_files(test_dir = path, test_paths = test_paths, test_package = package, if (snapshot_skipped) { reporter = reporter, load_helpers = load_helpers, env = env, skip("On CRAN") } stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, else if (!new_expectations && skip_on_empty) { load_package = load_package, parallel = parallel, shuffle = shuffle) skip_empty() 51: }test_dir("testthat", package = package, reporter = reporter, }, expectation = handle_expectation, packageNotFoundError = function(e) { ..., load_package = "installed") if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))52: test_check("missSBM") }}, snapshot_on_cran = function(cnd) { An irrecoverable exception occurred. R is aborting now ... 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) prefix <- paste0(prefix, "\n ") } Traceback: 1: else prefix <- "Error : "dispatcher(membership_name, membership_init$to_cc(), model_name, msg <- paste0(prefix, conditionMessage(e), "\n") .self$network_to_cc(), TRUE) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { 2: cat(msg, file = outFile)FUN(X[[i]], ...) .Internal(printDeferredWarnings()) } 3: invisible(structure(msg, class = "try-error", condition = e))lapply(X = S, FUN = FUN, ...)}) 4: 8: doTryCatch(return(expr), name, parentenv, handler)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: tryCatchList(expr, classes, parentenv, handlers) 10: 7: FUN(X[[i]], ...) tryCatch(expr, error = function(e) {11: call <- conditionCall(e)lapply(seq_len(cores), inner.do) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L13: sm <- strsplit(conditionMessage(e), "\n")[[1L]]parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) verbose = (verbosity > 4)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) 14: prefix <- paste0(prefix, "\n ").self$do_with_inits(inits, Q, reinitialization_effort) } else prefix <- "Error : "15: msg <- paste0(prefix, conditionMessage(e), "\n").self$estim_ascend(reinitialization_effort, changing_effort) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile)16: private$BMobject$estimate() .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))17: })mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 18: 9: eval(code, test_env)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 19: 10: eval(code, test_env)FUN(X[[i]], ...) 20: 11: withCallingHandlers({ eval(code, test_env)lapply(seq_len(cores), inner.do) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {12: skip("On CRAN")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, } else if (!new_expectations && skip_on_empty) { mc.silent = TRUE) skip_empty() }13: }, expectation = handle_expectation, packageNotFoundError = function(e) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }14: }, snapshot_on_cran = function(cnd) {.self$do_with_inits(inits, Q, reinitialization_effort) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")15: }, skip = handle_skip, warning = handle_warning, message = handle_message, .self$estim_ascend(reinitialization_effort, changing_effort) error = handle_error, interrupt = handle_interrupt)16: private$BMobject$estimate()21: doTryCatch(return(expr), name, parentenv, handler)17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))22: tryCatchOne(expr, names, parentenv, handlers[[1L]])18: eval(code, test_env)23: tryCatchList(expr, classes, parentenv, handlers)19: eval(code, test_env)24: tryCatch(withCallingHandlers({20: 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) { if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) 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)25: doWithOneRestart(return(expr), restart)21: doTryCatch(return(expr), name, parentenv, handler) 26: 22: withOneRestart(expr, restarts[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]]) 27: 23: withRestarts(tryCatch(withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations24: if (snapshot_skipped) {tryCatch(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") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { 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), error = handle_fatal), invokeRestart("muffle_cran_snapshot") end_test = function() {}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 28: 25: test_code(code, parent.frame()) doWithOneRestart(return(expr), restart)29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 26: {withOneRestart(expr, restarts[[1L]]) sampler_directed_cov$rNetwork(store = TRUE)27: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, withRestarts(tryCatch(withCallingHandlers({ "bernoulli", TRUE, covarList = covarList_directed) eval(code, test_env) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, new_expectations <- the$test_expectations > starting_expectations plot = FALSE)) if (snapshot_skipped) { mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, skip("On CRAN") covariates = covarList_directed) } else if (!new_expectations && skip_on_empty) { cls <- net$clustering(1:(2 * Q)) skip_empty() cl <- cls[[Q]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, }, expectation = handle_expectation, packageNotFoundError = function(e) { clusterInit = cl, covarList = covarList_directed) if (on_cran()) { mySBM_missSBM$doVEM(trace = TRUE) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }}, snapshot_on_cran = function(cnd) { 0.1) snapshot_skipped <<- TRUE expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), invokeRestart("muffle_cran_snapshot") 0.8)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) end_test = function() { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), }) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 28: 0.85)test_code(code, parent.frame()) }) 29: 30: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", eval(code, test_env) { sampler_directed_cov$rNetwork(store = TRUE)31: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, eval(code, test_env) "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 32: plot = FALSE))withCallingHandlers({ mySBM_sbm$setModel(Q) eval(code, test_env) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { covariates = covarList_directed) skip("On CRAN") cls <- net$clustering(1:(2 * Q)) } cl <- cls[[Q]] else if (!new_expectations && skip_on_empty) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, skip_empty() clusterInit = cl, covarList = covarList_directed) } mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.1) if (on_cran()) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), skip(paste0("{", e$package, "} is not installed.")) 0.8) } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }, snapshot_on_cran = function(cnd) { 0.05) snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), invokeRestart("muffle_cran_snapshot") 0.1)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), error = handle_error, interrupt = handle_interrupt) 0.85) })33: doTryCatch(return(expr), name, parentenv, handler)30: eval(code, test_env)34: tryCatchOne(expr, names, parentenv, handlers[[1L]])31: eval(code, test_env)35: tryCatchList(expr, classes, parentenv, handlers) 32: 36: 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_error, interrupt = handle_interrupt), error = handle_fatal) 33: 37: doTryCatch(return(expr), name, parentenv, handler)doWithOneRestart(return(expr), restart) 34: 38: tryCatchOne(expr, names, parentenv, handlers[[1L]])withOneRestart(expr, restarts[[1L]]) 35: 39: tryCatchList(expr, classes, parentenv, handlers)withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)36: new_expectations <- the$test_expectations > starting_expectationstryCatch(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) { 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 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) }) 37: 40: doWithOneRestart(return(expr), restart) test_code(code = exprs, env = env, reporter = get_reporter() %||% 38: StopReporter$new())withOneRestart(expr, restarts[[1L]]) 41: 39: source_file(path, env = env(env), desc = desc, shuffle = shuffle, withRestarts(tryCatch(withCallingHandlers({ error_call = error_call) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {42: skip("On CRAN")FUN(X[[i]], ...) } else if (!new_expectations && skip_on_empty) {43: skip_empty()lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, } error_call = error_call)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {44: skip(paste0("{", e$package, "} is not installed.")) }doTryCatch(return(expr), name, parentenv, handler)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE45: invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 46: end_test = function() {tryCatchList(expr, classes, parentenv, handlers) }) 47: 40: tryCatch(code, testthat_abort_reporter = function(cnd) {test_code(code = exprs, env = env, reporter = get_reporter() %||% cat(conditionMessage(cnd), "\n") StopReporter$new()) NULL 41: })source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 42: FUN(X[[i]], ...) env = env, desc = desc, shuffle = shuffle, error_call = error_call)) 43: 49: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, test_files_serial(test_dir = test_dir, test_package = test_package, error_call = error_call) 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, 44: doTryCatch(return(expr), name, parentenv, handler) error_call = error_call) 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, 45: reporter = reporter, load_helpers = load_helpers, env = env, tryCatchOne(expr, names, parentenv, handlers[[1L]]) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)46: tryCatchList(expr, classes, parentenv, handlers) 51: 47: test_dir("testthat", package = package, reporter = reporter, tryCatch(code, testthat_abort_reporter = function(cnd) { ..., load_package = "installed") cat(conditionMessage(cnd), "\n") NULL52: })test_check("missSBM") 48: An irrecoverable exception occurred. R is aborting now ... 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: 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: Traceback: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 1: dispatcher(membership_name, membership_init$to_cc(), model_name, 9: .self$network_to_cc(), TRUE) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 2: FUN(X[[i]], ...) 10: 3: FUN(X[[i]], ...)lapply(X = S, FUN = FUN, ...) 4: 11: lapply(seq_len(cores), inner.do)doTryCatch(return(expr), name, parentenv, handler) 12: 5: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, tryCatchOne(expr, names, parentenv, handlers[[1L]]) mc.silent = TRUE) 6: 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, tryCatchList(expr, classes, parentenv, handlers) verbose = (verbosity > 4)) 7: 14: tryCatch(expr, error = function(e) {.self$do_with_inits(inits, Q, reinitialization_effort) call <- conditionCall(e) if (!is.null(call)) {15: if (identical(call[[1L]], quote(doTryCatch))) .self$estim_ascend(reinitialization_effort, changing_effort) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)16: prefix <- paste("Error in", dcall, ": ")private$BMobject$estimate() LONG <- 75L 17: sm <- strsplit(conditionMessage(e), "\n")[[1L]]mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) 18: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], eval(code, test_env) type = "b") if (w > LONG) 19: prefix <- paste0(prefix, "\n ")eval(code, test_env) } else prefix <- "Error : "20: msg <- paste0(prefix, conditionMessage(e), "\n")withCallingHandlers({ .Internal(seterrmessage(msg[1L])) eval(code, test_env) if (!silent && isTRUE(getOption("show.error.messages"))) { new_expectations <- the$test_expectations > starting_expectations cat(msg, file = outFile) if (snapshot_skipped) { .Internal(printDeferredWarnings()) skip("On CRAN") } } invisible(structure(msg, class = "try-error", condition = e)) else if (!new_expectations && skip_on_empty) {}) skip_empty() } 8: }, expectation = handle_expectation, packageNotFoundError = function(e) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (on_cran()) { 9: skip(paste0("{", e$package, "} is not installed."))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) } }, snapshot_on_cran = function(cnd) {10: snapshot_skipped <<- TRUEFUN(X[[i]], ...) invokeRestart("muffle_cran_snapshot")11: }, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(seq_len(cores), inner.do) error = handle_error, interrupt = handle_interrupt) 12: 21: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, doTryCatch(return(expr), name, parentenv, handler) mc.silent = TRUE) 13: 22: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 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: .self$estim_ascend(reinitialization_effort, changing_effort)24: tryCatch(withCallingHandlers({16: private$BMobject$estimate() eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) if (snapshot_skipped) { skip("On CRAN")18: }eval(code, test_env) else if (!new_expectations && skip_on_empty) { skip_empty()19: }eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {20: skip(paste0("{", e$package, "} is not installed."))withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal) else if (!new_expectations && skip_on_empty) { skip_empty()25: }doWithOneRestart(return(expr), restart)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {26: skip(paste0("{", e$package, "} is not installed."))withOneRestart(expr, restarts[[1L]]) } }, snapshot_on_cran = function(cnd) {27: snapshot_skipped <<- TRUEwithRestarts(tryCatch(withCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt) skip("On CRAN") }21: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty() }22: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }23: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE 24: tryCatch(withCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { if (snapshot_skipped) { }) skip("On CRAN") }28: test_code(code, parent.frame()) else if (!new_expectations && skip_on_empty) { skip_empty()29: }test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", }, expectation = handle_expectation, packageNotFoundError = function(e) { { if (on_cran()) { sampler_undirected_nocov$rNetwork(store = TRUE) skip(paste0("{", e$package, "} is not installed.")) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, }, snapshot_on_cran = function(cnd) { "bernoulli", FALSE) snapshot_skipped <<- TRUE mySBM_sbm$optimize(estimOptions = list(verbosity = 0, invokeRestart("muffle_cran_snapshot") plot = FALSE))}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, 25: doWithOneRestart(return(expr), restart) clusterInit = cl) mySBM_missSBM$doVEM()26: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), withOneRestart(expr, restarts[[1L]]) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 27: 0.95)withRestarts(tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), eval(code, test_env) 0.01) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), skip("On CRAN") 0.05) } expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), else if (!new_expectations && skip_on_empty) { 0.95) skip_empty() }) }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))30: eval(code, test_env) } }, snapshot_on_cran = function(cnd) {31: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")eval(code, test_env) }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 32: withCallingHandlers({ end_test = function() { eval(code, test_env) }) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {28: skip("On CRAN")test_code(code, parent.frame()) } 29: else if (!new_expectations && skip_on_empty) {test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", skip_empty() { } sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", FALSE) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) skip(paste0("{", e$package, "} is not installed.")) mySBM_sbm$setModel(3) } net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)}, snapshot_on_cran = function(cnd) { cl <- net$clustering(3)[[1]] snapshot_skipped <<- TRUE mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, invokeRestart("muffle_cran_snapshot") clusterInit = cl) mySBM_missSBM$doVEM()}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) error = handle_error, interrupt = handle_interrupt) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 33: 0.95)doTryCatch(return(expr), name, parentenv, handler) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01)34: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 35: 0.95)tryCatchList(expr, classes, parentenv, handlers) }) 36: 30: tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations31: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")32: }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) {}, 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) { snapshot_skipped <<- TRUE37: invokeRestart("muffle_cran_snapshot")doWithOneRestart(return(expr), restart)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)38: withOneRestart(expr, restarts[[1L]])33: doTryCatch(return(expr), name, parentenv, handler)39: withRestarts(tryCatch(withCallingHandlers({34: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]]) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {35: skip("On CRAN")tryCatchList(expr, classes, parentenv, handlers) } else if (!new_expectations && skip_on_empty) {36: skip_empty()tryCatch(withCallingHandlers({ 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), error = handle_fatal), skip(paste0("{", e$package, "} is not installed.")) end_test = function() { } })}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE40: invokeRestart("muffle_cran_snapshot")test_code(code = exprs, env = env, reporter = get_reporter() %||% }, skip = handle_skip, warning = handle_warning, message = handle_message, StopReporter$new()) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 41: 37: source_file(path, env = env(env), desc = desc, shuffle = shuffle, doWithOneRestart(return(expr), restart) error_call = error_call) 38: 42: withOneRestart(expr, restarts[[1L]])FUN(X[[i]], ...) 43: 39: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") }44: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty() }45: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))46: }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE47: invokeRestart("muffle_cran_snapshot")tryCatch(code, testthat_abort_reporter = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, cat(conditionMessage(cnd), "\n") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), NULL}) end_test = function() { })48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 40: test_code(code = exprs, env = env, reporter = get_reporter() %||% env = env, desc = desc, shuffle = shuffle, error_call = error_call)) StopReporter$new()) 49: 41: test_files_serial(test_dir = test_dir, test_package = test_package, source_file(path, env = env(env), desc = desc, shuffle = shuffle, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 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, 42: error_call = error_call)FUN(X[[i]], ...) 43: 50: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, test_files(test_dir = path, test_paths = test_paths, test_package = package, error_call = error_call) reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 44: doTryCatch(return(expr), name, parentenv, handler) 45: load_package = load_package, parallel = parallel, shuffle = shuffle) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 46: 51: tryCatchList(expr, classes, parentenv, handlers) test_dir("testthat", package = package, reporter = reporter, 47: ..., load_package = "installed")tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL })52: test_check("missSBM") 48: An irrecoverable exception occurred. R is aborting now ... 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-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, .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, directed, no covariate", { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) 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.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95) }) Traceback: 30: 1: eval(code, test_env) dispatcher(membership_name, membership_init$to_cc(), model_name, 31: .self$network_to_cc(), TRUE) eval(code, test_env) 2: FUN(X[[i]], ...)32: withCallingHandlers({ 3: eval(code, test_env)lapply(X = S, FUN = FUN, ...) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 4: skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) } else if (!new_expectations && skip_on_empty) { 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty() } 6: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) 7: }tryCatch(expr, error = function(e) {}, snapshot_on_cran = function(cnd) { call <- conditionCall(e) snapshot_skipped <<- TRUE if (!is.null(call)) { invokeRestart("muffle_cran_snapshot") if (identical(call[[1L]], quote(doTryCatch))) }, skip = handle_skip, warning = handle_warning, message = handle_message, call <- sys.call(-4L) error = handle_error, interrupt = handle_interrupt) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")33: doTryCatch(return(expr), name, parentenv, handler) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]34: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 35: tryCatchList(expr, classes, parentenv, handlers) type = "b") if (w > LONG) 36: prefix <- paste0(prefix, "\n ")tryCatch(withCallingHandlers({ eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else prefix <- "Error : " if (snapshot_skipped) { msg <- paste0(prefix, conditionMessage(e), "\n") skip("On CRAN") .Internal(seterrmessage(msg[1L])) } if (!silent && isTRUE(getOption("show.error.messages"))) { else if (!new_expectations && skip_on_empty) { cat(msg, file = outFile) skip_empty() .Internal(printDeferredWarnings()) } } invisible(structure(msg, class = "try-error", condition = e))}, expectation = handle_expectation, packageNotFoundError = function(e) {}) if (on_cran()) { 8: skip(paste0("{", e$package, "} is not installed."))try(lapply(X = S, FUN = FUN, ...), silent = TRUE) } }, snapshot_on_cran = function(cnd) { 9: snapshot_skipped <<- TRUEsendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 10: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)FUN(X[[i]], ...) 37: 11: doWithOneRestart(return(expr), restart)lapply(seq_len(cores), inner.do) 38: 12: withOneRestart(expr, restarts[[1L]])parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) 39: 13: withRestarts(tryCatch(withCallingHandlers({parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, eval(code, test_env) verbose = (verbosity > 4)) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {14: skip("On CRAN").self$do_with_inits(inits, Q, reinitialization_effort) } else if (!new_expectations && skip_on_empty) {15: skip_empty().self$estim_ascend(reinitialization_effort, changing_effort) } }, expectation = handle_expectation, packageNotFoundError = function(e) {16: if (on_cran()) {private$BMobject$estimate() skip(paste0("{", e$package, "} is not installed.")) }17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")18: }, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {19: })eval(code, test_env) 40: 20: test_code(code = exprs, env = env, reporter = get_reporter() %||% withCallingHandlers({ StopReporter$new()) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, if (snapshot_skipped) { error_call = error_call) skip("On CRAN") }42: else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty()43: }lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {44: skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler) } }, snapshot_on_cran = function(cnd) {45: snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 46: error = handle_error, interrupt = handle_interrupt)tryCatchList(expr, classes, parentenv, handlers) 21: doTryCatch(return(expr), name, parentenv, handler)47: tryCatch(code, testthat_abort_reporter = function(cnd) {22: cat(conditionMessage(cnd), "\n")tryCatchOne(expr, names, parentenv, handlers[[1L]]) NULL })23: 48: tryCatchList(expr, classes, parentenv, handlers)with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))24: tryCatch(withCallingHandlers({49: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationstest_files_serial(test_dir = test_dir, test_package = test_package, if (snapshot_skipped) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, skip("On CRAN") desc = desc, load_package = load_package, shuffle = shuffle, } error_call = error_call) else if (!new_expectations && skip_on_empty) { skip_empty()50: }test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, }, expectation = handle_expectation, packageNotFoundError = function(e) { stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, if (on_cran()) { load_package = load_package, parallel = parallel, shuffle = shuffle) skip(paste0("{", e$package, "} is not installed.")) } 51: }, snapshot_on_cran = function(cnd) {test_dir("testthat", package = package, reporter = reporter, snapshot_skipped <<- TRUE ..., load_package = "installed") invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 52: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)test_check("missSBM") 25: doWithOneRestart(return(expr), restart)An irrecoverable exception occurred. R is aborting now ... 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, directed, no covariate", { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) 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.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95) }) 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-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