CRAN Package Check Results for Package missSBM

Last updated on 2026-09-26 09:51:29 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 89.36 356.78 446.14 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 58.53 247.84 306.37 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 59.00 243.15 302.15 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 64.00 248.05 312.05 OK
r-devel-windows-x86_64 1.1.0 91.00 450.00 541.00 OK
r-patched-linux-x86_64 1.1.0 83.11 346.95 430.06 OK
r-release-linux-x86_64 1.1.0 90.56 343.79 434.35 OK
r-release-macos-arm64 1.1.0 17.00 92.00 109.00 OK
r-release-macos-x86_64 1.1.0 59.00 456.00 515.00 OK
r-release-windows-x86_64 1.1.0 98.00 361.00 459.00 OK
r-oldrel-macos-arm64 1.1.0 19.00 239.00 258.00 ERROR
r-oldrel-macos-x86_64 1.1.0 59.00 679.00 738.00 OK
r-oldrel-windows-x86_64 1.1.0 115.00 501.00 616.00 OK

Check Details

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