Skip to content

missSBM

Handling Missing Data in Stochastic Block Models

v1.0.5 · Mar 13, 2025 · GPL-3

Description

When a network is partially observed (here, NAs in the adjacency matrix rather than 1 or 0 due to missing information between node pairs), it is possible to account for the underlying process that generates those NAs. 'missSBM', presented in 'Barbillon, Chiquet and Tabouy' (2022) <doi:10.18637/jss.v101.i12>, adjusts the popular stochastic block model from network data sampled under various missing data conditions, as described in 'Tabouy, Barbillon and Chiquet' (2019) <doi:10.1080/01621459.2018.1562934>.

Downloads

290

Last 30 days

10841st

290

Last 90 days

290

Last year

CRAN Check Status

1 ERROR
2 NOTE
11 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 ERROR
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (14 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
ERROR r-devel-macos-arm64

tests

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

*


            
NOTE r-oldrel-macos-arm64

installed package size

  installed size is  7.0Mb
  sub-directories of 1Mb or more:
    libs   4.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

  installed size is  7.0Mb
  sub-directories of 1Mb or more:
    libs   4.9Mb
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

ERROR 11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-devel-macos-arm64

tests

  Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [15s/14s]
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 d
NOTE r-oldrel-macos-arm64

installed package size

  installed size is  7.0Mb
  sub-directories of 1Mb or more:
    libs   4.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

  installed size is  7.0Mb
  sub-directories of 1Mb or more:
    libs   4.9Mb

Reverse Dependencies (1)

suggests

Dependency Network

Dependencies Reverse dependencies Rcpp igraph nloptr ggplot2 future.apply R6 rlang sbm magrittr Matrix RSpectra gsbm missSBM

Version History

new 1.0.5 Mar 9, 2026