CRAN Package Check Results for Package missSBM

Last updated on 2026-11-06 19:01:56 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.0 83.53 339.15 422.68 OK
r-devel-linux-x86_64-debian-gcc 1.1.0 57.81 235.89 293.70 OK
r-devel-linux-x86_64-fedora-clang 1.1.0 57.00 OK
r-devel-linux-x86_64-fedora-gcc 1.1.0 64.00 239.38 303.38 OK
r-devel-windows-x86_64 1.1.0 91.00 417.00 508.00 OK
r-patched-linux-x86_64 1.1.0 OK
r-release-linux-x86_64 1.1.0 78.27 331.21 409.48 OK
r-release-macos-arm64 1.1.0 17.00 92.00 109.00 OK
r-release-macos-x86_64 1.1.0 59.00 456.00 515.00 OK
r-release-windows-x86_64 1.1.0 101.00 348.00 449.00 OK
r-oldrel-macos-arm64 1.1.0 ERROR
r-oldrel-macos-x86_64 1.1.0 59.00 679.00 738.00 OK
r-oldrel-windows-x86_64 1.1.0 118.00 480.00 598.00 OK

Check Details

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

mirror server hosted at Truenetwork, Russian Federation.