CRAN Package Check Results for Package missSBM

Last updated on 2026-11-22 08:50:26 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 79.64 381.25 460.89 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 61.77 266.72 328.49 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 66.00 274.28 340.28 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 63.00 262.15 325.15 OK
r-devel-windows-x86_64 1.1.0 98.00 448.00 546.00 OK
r-patched-linux-x86_64 1.1.0 88.83 361.66 450.49 OK
r-release-linux-x86_64 1.1.0 82.38 369.49 451.87 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 103.00 374.00 477.00 OK
r-oldrel-macos-arm64 1.1.0 21.00 91.00 112.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 113.00 525.00 638.00 OK

Check Details

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