CRAN Package Check Results for Package missSBM

Last updated on 2026-10-11 04:51:03 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 86.78 353.63 440.41 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 56.73 254.44 311.17 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 58.00 243.36 301.36 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 62.00 246.59 308.59 OK
r-devel-windows-x86_64 1.1.0 91.00 450.00 541.00 OK
r-patched-linux-x86_64 1.1.0 82.95 348.35 431.30 OK
r-release-linux-x86_64 1.1.0 74.39 345.64 420.03 OK
r-release-macos-arm64 1.1.0 17.00 92.00 109.00 OK
r-release-macos-x86_64 1.1.0 59.00 456.00 515.00 OK
r-release-windows-x86_64 1.1.0 91.00 364.00 455.00 OK
r-oldrel-macos-arm64 1.1.0 21.00 103.00 124.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 114.00 492.00 606.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) Traceback: 1: 7: dispatcher(membership_name, membership_init$to_cc(), model_name, tryCatch(expr, error = function(e) { .self$network_to_cc(), TRUE) 2: call <- conditionCall(e)FUN(X[[i]], ...) if (!is.null(call)) { 3: if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)lapply(X = S, FUN = FUN, ...) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") 4: LONG <- 75LdoTryCatch(return(expr), name, parentenv, handler) 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], type = "b") 6: if (w > LONG) tryCatchList(expr, classes, parentenv, handlers) prefix <- paste0(prefix, "\n ") } 7: tryCatch(expr, error = function(e) { else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) call <- conditionCall(e) if (!silent && isTRUE(getOption("show.error.messages"))) { if (!is.null(call)) { cat(msg, file = outFile) if (identical(call[[1L]], quote(doTryCatch))) .Internal(printDeferredWarnings()) call <- sys.call(-4L) } dcall <- deparse(call, nlines = 1L) invisible(structure(msg, class = "try-error", condition = e)) prefix <- paste("Error in", dcall, ": ")}) LONG <- 75L 8: sm <- strsplit(conditionMessage(e), "\n")[[1L]]try(lapply(X = S, FUN = FUN, ...), silent = TRUE) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) 9: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (w > LONG) prefix <- paste0(prefix, "\n ") }10: else prefix <- "Error : "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)}) 8: 13: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) 9: 14: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)).self$do_with_inits(inits, Q, reinitialization_effort) 15: 10: .self$estim_ascend(reinitialization_effort, changing_effort)FUN(X[[i]], ...) 11: 16: lapply(seq_len(cores), inner.do)private$BMobject$estimate() 12: 17: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mc.silent = TRUE) 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 18: verbose = (verbosity > 4))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({ eval(code, test_env)16: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {private$BMobject$estimate() skip("On CRAN") } else if (!new_expectations && skip_on_empty) {17: skip_empty()mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) }}, expectation = handle_expectation, packageNotFoundError = function(e) {18: if (on_cran()) { 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") 20: }, 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_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, 24: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)tryCatch(withCallingHandlers({ eval(code, test_env)25: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {doWithOneRestart(return(expr), restart) skip("On CRAN") }26: else if (!new_expectations && skip_on_empty) {withOneRestart(expr, restarts[[1L]]) skip_empty() }27: }, expectation = handle_expectation, packageNotFoundError = function(e) {withRestarts(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 invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip("On CRAN")25: }doWithOneRestart(return(expr), restart) 26: 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()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, expectation = handle_expectation, packageNotFoundError = function(e) { end_test = function() { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } })}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE28: invokeRestart("muffle_cran_snapshot")test_code(code, parent.frame())}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 29: end_test = function() {test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", }) { sampler_undirected_cov$rNetwork(store = TRUE)28: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, test_code(code, parent.frame()) "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 29: plot = FALSE))test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", mySBM_sbm$setModel(Q) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, sampler_undirected_cov$rNetwork(store = TRUE) covariates = covarList_undirected) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, cls <- net$clustering(1:(2 * Q)) "bernoulli", FALSE, covarList = covarList_undirected) cl <- cls[[Q]] mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, plot = FALSE)) clusterInit = cl, covarList = covarList_undirected) mySBM_sbm$setModel(Q) mySBM_missSBM$doVEM() net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), covariates = covarList_undirected) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), cls <- net$clustering(1:(2 * Q)) 0.8) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), clusterInit = cl, covarList = covarList_undirected) 0.01) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) 0.05) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.1) 0.8) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.85) 0.01) }) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1)30: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), eval(code, test_env) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 31: 0.85) })eval(code, test_env) 32: 30: eval(code, test_env)withCallingHandlers({ eval(code, test_env)31: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) { skip("On CRAN")32: }withCallingHandlers({ else if (!new_expectations && skip_on_empty) { eval(code, test_env) skip_empty() new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { } skip_empty()}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt) skip(paste0("{", e$package, "} is not installed.")) }33: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) 34: snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 35: error = handle_error, interrupt = handle_interrupt)tryCatchList(expr, classes, parentenv, handlers) 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") }}, 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() 37: 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 if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip("On CRAN") }37: else if (!new_expectations && skip_on_empty) {doWithOneRestart(return(expr), restart) 38: skip_empty()withOneRestart(expr, restarts[[1L]]) }}, expectation = handle_expectation, packageNotFoundError = function(e) { 39: withRestarts(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 else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, expectation = handle_expectation, packageNotFoundError = function(e) { end_test = function() { if (on_cran()) { }) 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: test_code(code = exprs, env = env, reporter = get_reporter() %||% 42: FUN(X[[i]], ...) StopReporter$new()) 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: 41: tryCatchOne(expr, names, parentenv, handlers[[1L]])source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)46: tryCatchList(expr, classes, parentenv, handlers)42: FUN(X[[i]], ...)47: tryCatch(code, testthat_abort_reporter = function(cnd) {43: cat(conditionMessage(cnd), "\n")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, NULL error_call = error_call)}) 44: 48: doTryCatch(return(expr), name, parentenv, handler)with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))45: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 46: tryCatchList(expr, classes, parentenv, handlers)49: test_files_serial(test_dir = test_dir, test_package = test_package, 47: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, tryCatch(code, testthat_abort_reporter = function(cnd) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, cat(conditionMessage(cnd), "\n") desc = desc, load_package = load_package, shuffle = shuffle, NULL error_call = error_call)}) 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, 48: reporter = reporter, load_helpers = load_helpers, env = env, with_reporter(reporters$multi, lapply(test_paths, test_one_file, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) load_package = load_package, parallel = parallel, shuffle = shuffle) 49: 51: test_files_serial(test_dir = test_dir, test_package = test_package, test_dir("testthat", package = package, reporter = reporter, 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, ..., load_package = "installed") error_call = error_call) 52: 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, test_check("missSBM") stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 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-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) 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() Traceback: } 1: }, expectation = handle_expectation, packageNotFoundError = function(e) {dispatcher(membership_name, membership_init$to_cc(), model_name, if (on_cran()) { .self$network_to_cc(), TRUE) skip(paste0("{", e$package, "} is not installed.")) } 2: }, snapshot_on_cran = function(cnd) {FUN(X[[i]], ...) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 3: lapply(X = S, FUN = FUN, ...)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 4: end_test = function() {doTryCatch(return(expr), name, parentenv, handler) }) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])28: test_code(code, parent.frame()) 6: tryCatchList(expr, classes, parentenv, handlers)29: 7: tryCatch(expr, error = function(e) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", call <- conditionCall(e) if (!is.null(call)) { { sampler_directed_cov$rNetwork(store = TRUE) if (identical(call[[1L]], quote(doTryCatch))) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, call <- sys.call(-4L) "bernoulli", TRUE, covarList = covarList_directed) dcall <- deparse(call, nlines = 1L) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) prefix <- paste("Error in", dcall, ": ") mySBM_sbm$setModel(Q) LONG <- 75L net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, sm <- strsplit(conditionMessage(e), "\n")[[1L]] covariates = covarList_directed) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") cls <- net$clustering(1:(2 * Q)) if (is.na(w)) cl <- cls[[Q]] w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") clusterInit = cl, covarList = covarList_directed) } else prefix <- "Error : " mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), msg <- paste0(prefix, conditionMessage(e), "\n") 0.1) .Internal(seterrmessage(msg[1L])) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), if (!silent && isTRUE(getOption("show.error.messages"))) { 0.8) cat(msg, file = outFile) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), .Internal(printDeferredWarnings()) 0.05) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), invisible(structure(msg, class = "try-error", condition = e)) 0.1)}) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) 8: }) try(lapply(X = S, FUN = FUN, ...), silent = TRUE)30: 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))eval(code, test_env) 10: FUN(X[[i]], ...)31: eval(code, test_env)11: lapply(seq_len(cores), inner.do) 32: withCallingHandlers({12: eval(code, test_env)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {13: skip("On CRAN")parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, } verbose = (verbosity > 4)) else if (!new_expectations && skip_on_empty) { skip_empty()14: .self$do_with_inits(inits, Q, reinitialization_effort) } }, expectation = handle_expectation, packageNotFoundError = function(e) {15: if (on_cran()) {.self$estim_ascend(reinitialization_effort, changing_effort) 16: skip(paste0("{", e$package, "} is not installed."))private$BMobject$estimate() } }, snapshot_on_cran = function(cnd) {17: snapshot_skipped <<- TRUEmySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 18: eval(code, test_env) error = handle_error, interrupt = handle_interrupt) 19: 33: eval(code, test_env) 20: doTryCatch(return(expr), name, parentenv, handler)withCallingHandlers({ eval(code, test_env)34: new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) { skip("On CRAN")35: }tryCatchList(expr, classes, parentenv, handlers) else if (!new_expectations && skip_on_empty) {36: skip_empty()tryCatch(withCallingHandlers({ eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, }}, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))21: }doTryCatch(return(expr), name, parentenv, handler)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE22: invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)23: tryCatchList(expr, classes, parentenv, handlers)37: doWithOneRestart(return(expr), restart)24: tryCatch(withCallingHandlers({38: eval(code, test_env)withOneRestart(expr, restarts[[1L]]) 39: new_expectations <- the$test_expectations > starting_expectationswithRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") } else if (!new_expectations && skip_on_empty) { 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 = 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) { snapshot_skipped <<- TRUE25: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), doWithOneRestart(return(expr), restart) end_test = function() { }) 26: 40: withOneRestart(expr, restarts[[1L]])test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) 41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, 27: withRestarts(tryCatch(withCallingHandlers({ error_call = error_call) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations42: FUN(X[[i]], ...) if (snapshot_skipped) { skip("On CRAN")43: }lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, else if (!new_expectations && skip_on_empty) { error_call = error_call) skip_empty() 44: }doTryCatch(return(expr), name, parentenv, handler)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {45: skip(paste0("{", e$package, "} is not installed."))tryCatchOne(expr, names, parentenv, handlers[[1L]]) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE46: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 47: end_test = function() {tryCatch(code, testthat_abort_reporter = function(cnd) { }) cat(conditionMessage(cnd), "\n") NULL28: }) test_code(code, parent.frame())48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, 29: env = env, desc = desc, shuffle = shuffle, error_call = error_call))test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { sampler_directed_cov$rNetwork(store = TRUE)49: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, test_files_serial(test_dir = test_dir, test_package = test_package, "bernoulli", TRUE, covarList = covarList_directed) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, plot = FALSE)) desc = desc, load_package = load_package, shuffle = shuffle, mySBM_sbm$setModel(Q) error_call = error_call) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]]50: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, test_files(test_dir = path, test_paths = test_paths, test_package = package, clusterInit = cl, covarList = covarList_directed) reporter = reporter, load_helpers = load_helpers, env = env, mySBM_missSBM$doVEM(trace = TRUE) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), load_package = load_package, parallel = parallel, shuffle = shuffle) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 51: 0.8)test_dir("testthat", package = package, reporter = reporter, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), ..., load_package = "installed") 0.05) 52: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), test_check("missSBM") 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85)An irrecoverable exception occurred. R is aborting now ... }) 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-46.R *** 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: lapply(X = S, FUN = FUN, ...) 3: lapply(X = S, FUN = FUN, ...) 4: doTryCatch(return(expr), name, parentenv, handler) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch(expr, error = function(e) { call <- conditionCall(e) 7: if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) tryCatch(expr, error = function(e) { call <- conditionCall(e) call <- sys.call(-4L) if (!is.null(call)) { dcall <- deparse(call, nlines = 1L) if (identical(call[[1L]], quote(doTryCatch))) prefix <- paste("Error in", dcall, ": ") call <- sys.call(-4L) LONG <- 75L dcall <- deparse(call, nlines = 1L) sm <- strsplit(conditionMessage(e), "\n")[[1L]] prefix <- paste("Error in", dcall, ": ") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") LONG <- 75L if (is.na(w)) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") type = "b") if (is.na(w)) if (w > LONG) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], prefix <- paste0(prefix, "\n ") type = "b") } if (w > LONG) else prefix <- "Error : " prefix <- paste0(prefix, "\n ") msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") if (!silent && isTRUE(getOption("show.error.messages"))) { .Internal(seterrmessage(msg[1L])) cat(msg, file = outFile) if (!silent && isTRUE(getOption("show.error.messages"))) { 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: 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 18: 18: eval(code, test_env)eval(code, test_env) 19: 19: eval(code, test_env)eval(code, test_env) 20: 20: withCallingHandlers({withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)21: doTryCatch(return(expr), name, parentenv, handler)21: doTryCatch(return(expr), name, parentenv, handler)22: tryCatchOne(expr, names, parentenv, handlers[[1L]])22: tryCatchOne(expr, names, parentenv, handlers[[1L]])23: tryCatchList(expr, classes, parentenv, handlers)23: tryCatchList(expr, classes, parentenv, handlers)24: tryCatch(withCallingHandlers({24: eval(code, test_env)tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { skip_empty() } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE } 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")25: }, skip = handle_skip, warning = handle_warning, message = handle_message, doWithOneRestart(return(expr), restart) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 26: 25: withOneRestart(expr, restarts[[1L]])doWithOneRestart(return(expr), restart) 27: 26: withRestarts(tryCatch(withCallingHandlers({withOneRestart(expr, restarts[[1L]]) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations27: 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), 28: end_test = function() {test_code(code, parent.frame()) }) 29: 28: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", test_code(code, parent.frame()) { sampler_undirected_nocov$rNetwork(store = TRUE)29: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", "bernoulli", FALSE) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, sampler_undirected_nocov$rNetwork(store = TRUE) plot = FALSE)) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, mySBM_sbm$setModel(3) "bernoulli", FALSE) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, cl <- net$clustering(3)[[1]] plot = FALSE)) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, mySBM_sbm$setModel(3) clusterInit = cl) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) mySBM_missSBM$doVEM() cl <- net$clustering(3)[[1]] expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, 0.05) clusterInit = cl) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), mySBM_missSBM$doVEM() 0.95) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) 0.01) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.95) 0.05) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.01) 0.95) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), }) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 30: 0.95)eval(code, test_env) }) 31: 30: eval(code, test_env)eval(code, test_env) 32: 31: withCallingHandlers({eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations32: if (snapshot_skipped) {withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, 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")33: }, skip = handle_skip, warning = handle_warning, message = handle_message, doTryCatch(return(expr), name, parentenv, handler) error = handle_error, interrupt = handle_interrupt) 34: tryCatchOne(expr, names, parentenv, handlers[[1L]])33: doTryCatch(return(expr), name, parentenv, handler)35: tryCatchList(expr, classes, parentenv, handlers)34: tryCatchOne(expr, names, parentenv, handlers[[1L]])36: tryCatch(withCallingHandlers({35: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers) 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: withOneRestart(expr, restarts[[1L]])37: doWithOneRestart(return(expr), restart)39: withRestarts(tryCatch(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) { skip_empty() new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { } skip_empty()}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, expectation = handle_expectation, packageNotFoundError = function(e) { invokeRestart("muffle_cran_snapshot") if (on_cran()) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() {}, snapshot_on_cran = function(cnd) { }) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 40: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_code(code = exprs, env = env, reporter = get_reporter() %||% end_test = function() { StopReporter$new()) }) 41: 40: source_file(path, env = env(env), desc = desc, shuffle = shuffle, test_code(code = exprs, env = env, reporter = get_reporter() %||% error_call = error_call) StopReporter$new()) 42: 41: FUN(X[[i]], ...)source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 42: error_call = error_call)FUN(X[[i]], ...) 44: 43: doTryCatch(return(expr), name, parentenv, handler)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call) 45: 44: tryCatchOne(expr, names, parentenv, handlers[[1L]])doTryCatch(return(expr), name, parentenv, handler) 46: 45: tryCatchList(expr, classes, parentenv, handlers)tryCatchOne(expr, names, parentenv, handlers[[1L]]) 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-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) Traceback: new_expectations <- the$test_expectations > starting_expectations 1: if (snapshot_skipped) {dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) skip("On CRAN") 2: } else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty() } 3: }, expectation = handle_expectation, packageNotFoundError = function(e) {lapply(X = S, FUN = FUN, ...) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } 4: doTryCatch(return(expr), name, parentenv, handler)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE 5: invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message, 6: error = handle_error, interrupt = handle_interrupt)tryCatchList(expr, classes, parentenv, handlers) 21: 7: doTryCatch(return(expr), name, parentenv, handler)tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) {22: if (identical(call[[1L]], quote(doTryCatch))) tryCatchOne(expr, names, parentenv, handlers[[1L]]) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")23: LONG <- 75LtryCatchList(expr, classes, parentenv, handlers) 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], 24: type = "b")tryCatch(withCallingHandlers({ if (w > LONG) prefix <- paste0(prefix, "\n ") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else prefix <- "Error : " if (snapshot_skipped) { msg <- paste0(prefix, conditionMessage(e), "\n") skip("On CRAN") .Internal(seterrmessage(msg[1L])) } if (!silent && isTRUE(getOption("show.error.messages"))) { else if (!new_expectations && skip_on_empty) { cat(msg, file = outFile) skip_empty() } .Internal(printDeferredWarnings()) }}, expectation = handle_expectation, packageNotFoundError = function(e) { invisible(structure(msg, class = "try-error", condition = e)) if (on_cran()) {}) skip(paste0("{", e$package, "} is not installed.")) } 8: }, snapshot_on_cran = function(cnd) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) snapshot_skipped <<- TRUE 9: invokeRestart("muffle_cran_snapshot")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 10: 25: FUN(X[[i]], ...)doWithOneRestart(return(expr), restart) 11: 26: lapply(seq_len(cores), inner.do)withOneRestart(expr, restarts[[1L]]) 12: 27: withRestarts(tryCatch(withCallingHandlers({parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, eval(code, test_env) mc.silent = TRUE) new_expectations <- the$test_expectations > starting_expectations 13: if (snapshot_skipped) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, skip("On CRAN") verbose = (verbosity > 4)) } else if (!new_expectations && skip_on_empty) {14: skip_empty().self$do_with_inits(inits, Q, reinitialization_effort) }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {15: skip(paste0("{", e$package, "} is not installed.")).self$estim_ascend(reinitialization_effort, changing_effort) } }, snapshot_on_cran = function(cnd) {16: snapshot_skipped <<- TRUEprivate$BMobject$estimate() invokeRestart("muffle_cran_snapshot") 17: }, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {18: })eval(code, test_env) 28: test_code(code, parent.frame())19: eval(code, test_env)29: 20: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", withCallingHandlers({ { eval(code, test_env) sampler_directed_nocov$rNetwork(store = TRUE) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, if (snapshot_skipped) { "bernoulli", TRUE) skip("On CRAN") mySBM_sbm$optimize(estimOptions = list(verbosity = 0, } plot = FALSE)) else if (!new_expectations && skip_on_empty) { mySBM_sbm$setModel(3) skip_empty() net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) } cl <- net$clustering(3)[[1]]}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, if (on_cran()) { clusterInit = cl) skip(paste0("{", e$package, "} is not installed.")) } mySBM_missSBM$doVEM()}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) snapshot_skipped <<- TRUE expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), invokeRestart("muffle_cran_snapshot") 0.95)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), error = handle_error, interrupt = handle_interrupt) 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 21: 0.1)doTryCatch(return(expr), name, parentenv, handler) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2)22: expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0.95) 23: })tryCatchList(expr, classes, parentenv, handlers) 24: 30: tryCatch(withCallingHandlers({ eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN")31: }eval(code, test_env) else if (!new_expectations && skip_on_empty) { skip_empty()32: }withCallingHandlers({}, 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() }}, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))25: }doWithOneRestart(return(expr), restart) }, snapshot_on_cran = function(cnd) {26: snapshot_skipped <<- TRUEwithOneRestart(expr, restarts[[1L]]) invokeRestart("muffle_cran_snapshot") }, skip = handle_skip, warning = handle_warning, message = handle_message, 27: withRestarts(tryCatch(withCallingHandlers({ error = handle_error, interrupt = handle_interrupt) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations33: doTryCatch(return(expr), name, parentenv, handler) if (snapshot_skipped) { skip("On CRAN")34: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) else if (!new_expectations && skip_on_empty) { skip_empty()35: }tryCatchList(expr, classes, parentenv, handlers)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {36: skip(paste0("{", e$package, "} is not installed."))tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), else if (!new_expectations && skip_on_empty) { end_test = function() { skip_empty() }) } }, expectation = handle_expectation, packageNotFoundError = function(e) {28: test_code(code, parent.frame()) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))29: }test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", }, snapshot_on_cran = function(cnd) { { snapshot_skipped <<- TRUE sampler_directed_nocov$rNetwork(store = TRUE) invokeRestart("muffle_cran_snapshot") mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, }, skip = handle_skip, warning = handle_warning, message = handle_message, "bernoulli", TRUE) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))37: mySBM_sbm$setModel(3)doWithOneRestart(return(expr), restart) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) 38: cl <- net$clustering(3)[[1]]withOneRestart(expr, restarts[[1L]]) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl)39: mySBM_missSBM$doVEM()withRestarts(tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), eval(code, test_env) 0.1) new_expectations <- the$test_expectations > starting_expectations expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), if (snapshot_skipped) { 0.95) skip("On CRAN") expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.01) else if (!new_expectations && skip_on_empty) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), skip_empty() 0.1) } 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.")) }) } }, snapshot_on_cran = function(cnd) {30: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 31: end_test = function() {eval(code, test_env) }) 32: withCallingHandlers({40: eval(code, test_env)test_code(code = exprs, env = env, reporter = get_reporter() %||% new_expectations <- the$test_expectations > starting_expectations StopReporter$new()) if (snapshot_skipped) { skip("On CRAN") }41: else if (!new_expectations && skip_on_empty) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip_empty() error_call = error_call) } }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {42: skip(paste0("{", e$package, "} is not installed."))FUN(X[[i]], ...) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")43: }, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt) error_call = error_call) 33: 44: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler) 45: 34: tryCatchOne(expr, names, parentenv, handlers[[1L]]) tryCatchOne(expr, names, parentenv, handlers[[1L]])46: tryCatchList(expr, classes, parentenv, handlers)35: tryCatchList(expr, classes, parentenv, handlers)47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL36: })tryCatch(withCallingHandlers({ 48: eval(code, test_env)with_reporter(reporters$multi, lapply(test_paths, test_one_file, new_expectations <- the$test_expectations > starting_expectations env = env, desc = desc, shuffle = shuffle, error_call = error_call)) if (snapshot_skipped) { skip("On CRAN")49: } else if (!new_expectations && skip_on_empty) { skip_empty()test_files_serial(test_dir = test_dir, test_package = test_package, } test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, }, expectation = handle_expectation, packageNotFoundError = function(e) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, if (on_cran()) { error_call = error_call) skip(paste0("{", e$package, "} is not installed.")) }50: }, snapshot_on_cran = function(cnd) {test_files(test_dir = path, test_paths = test_paths, test_package = package, snapshot_skipped <<- TRUE reporter = reporter, load_helpers = load_helpers, env = env, invokeRestart("muffle_cran_snapshot") stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, skip = handle_skip, warning = handle_warning, message = handle_message, load_package = load_package, parallel = parallel, shuffle = shuffle) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 51: 37: test_dir("testthat", package = package, reporter = reporter, doWithOneRestart(return(expr), restart) ..., load_package = "installed") 52: 38: test_check("missSBM")withOneRestart(expr, restarts[[1L]]) An irrecoverable exception occurred. R is aborting now ... 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