CRAN Package Check Results for Package missSBM

Last updated on 2026-11-02 10:53:19 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 82.70 337.88 420.58 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 59.92 235.63 295.55 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 60.00 235.13 295.13 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 85.14 334.40 419.54 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 20.00 89.00 109.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 116.00 482.00 598.00 OK

Check Details

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