CRAN Package Check Results for Package missSBM

Last updated on 2026-10-17 06:51:01 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 88.36 352.66 441.02 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 58.03 240.79 298.82 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 57.00 247.35 304.35 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 63.00 247.59 310.59 OK
r-devel-windows-x86_64 1.1.0 95.00 449.00 544.00 OK
r-patched-linux-x86_64 1.1.0 85.58 342.08 427.66 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 98.00 358.00 456.00 OK
r-oldrel-macos-arm64 1.1.0 23.00 87.00 110.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 119.00 528.00 647.00 OK

Check Details

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

mirror server hosted at Truenetwork, Russian Federation.