CRAN Package Check Results for Package missSBM

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