Running examples in ‘NetRep-Ex.R’ failed
The error most likely occurred in:

> ### Name: permutationTest
> ### Title: Permutation test P-values for module preservation statistics
> ### Aliases: permutationTest permutation permuted
> ### Keywords: internal
> 
> ### ** Examples
> 
> data("NetRep")
> 
> # Set up input lists for each input matrix type across datasets. The list
> # elements can have any names, so long as they are consistent between the
> # inputs.
> network_list <- list(discovery=discovery_network, test=test_network)
> data_list <- list(discovery=discovery_data, test=test_data)
> correlation_list <- list(discovery=discovery_correlation, test=test_correlation)
> labels_list <- list(discovery=module_labels)
> 
> # Note that we recommend running at least 10,000 permutations to make sure 
> # that the null distributions are representative.
> 
> preservation <- modulePreservation(
+  network=network_list, data=data_list, correlation=correlation_list, 
+  moduleAssignments=labels_list, nPerm=1000, discovery="discovery", 
+  test="test"
+ )
[2020-03-30 09:21:12 BST] Validating user input...
[2020-03-30 09:21:12 BST]   Checking matrices for problems...
[2020-03-30 09:21:12 BST] Input ok!
[2020-03-30 09:21:12 BST] Calculating preservation of network subsets from
                          dataset "discovery" in dataset "test".
[2020-03-30 09:21:12 BST]   Pre-computing network properties in dataset
                            "discovery"...
[2020-03-30 09:21:13 BST]   Calculating observed test statistics...
[2020-03-30 09:21:13 BST]   Generating null distributions from 1000
                            permutations using 15 threads...


    1% completed.
 *** caught segfault ***
address 19eb97a8, cause 'memory not mapped'

 *** caught segfault ***
address 16d5b559, cause 'memory not mapped'
Warning in value[[3L]](cond) :
Traceback:
 1: doWithOneRestart(return(expr), restart)
 2: withOneRestart(expr, restarts[[1L]])
 3: withRestarts({    .Internal(.signalCondition(simpleWarning(msg, call), msg,         call))    .Internal(.dfltWarn(msg, call))}, muffleWarning = function() NULL)
 4: .signalSimpleWarning("Failed with error:\nBLAS/LAPACK routine 'DORGQRNo transposeCo' gave error code -3\nSkipping to next comparison",     base::quote(value[[3L]](cond)))
 5: warning("Failed with error:\n", e$message, "\nSkipping to next comparison",     immediate. = TRUE)
 6: value[[3L]](cond)
 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 8: tryCatchList(expr, classes, parentenv, handlers)
 9: tryCatch({    vCat(verbose, 0, sep = "", "Calculating preservation of network subsets from dataset ",         "\"", datasetNames[di], "\"", " in dataset ", "\"", datasetNames[ti],         "\"", ".")    ct <- contingencyTable(moduleAssignments[c(di, ti)], modules[[di]],         nodelist[[ti]])    contingency <- ct$contingency    propVarsPres <- ct$propVarsPres    overlapVars <- ct$overlapVars    varsPres <- ct$varsPres    overlapModules <- ct$overlapModules    overlapAssignments <- ct$overlapAssignments    nStatistics <- ifelse(!is.null(data[[di]]) && !is.null(data[[ti]]),         7, 4)    nModules <- length(overlapModules)    if (di != loadedIdx) {        anyDM <- any.disk.matrix(data[[loadedIdx]], correlation[[loadedIdx]],             network[[loadedIdx]])        vCat(verbose && anyDM, 1, "Unloading dataset from RAM...")        dataEnv$matrix <- NULL        correlationEnv$matrix <- NULL        networkEnv$matrix <- NULL        gc()        anyDM <- any.disk.matrix(data[[di]], correlation[[di]],             network[[di]])        vCat(verbose && anyDM, 1, "Loading matrices of dataset \"",             datasetNames[di], "\" into RAM...", sep = "")        if (!is.null(data[[di]])) {            dataEnv$matrix <- Scale(loadIntoRAM(data[[di]]))            gc()        }        else {            dataEnv$matrix <- NULL        }        correlationEnv$matrix <- loadIntoRAM(correlation[[di]])        networkEnv$matrix <- loadIntoRAM(network[[di]])        loadedIdx <- di    }    vCat(verbose, 1, "Pre-computing network properties in dataset \"",         datasetNames[di], "\"...", sep = "")    if (is.null(data[[di]]) || is.null(data[[ti]])) {        discProps <- IntermediatePropertiesNoData(correlationEnv$matrix,             networkEnv$matrix, nodelist[[ti]], moduleAssignments[[di]],             modules[[di]])    }    else {        discProps <- IntermediateProperties(dataEnv$matrix, correlationEnv$matrix,             networkEnv$matrix, nodelist[[ti]], moduleAssignments[[di]],             modules[[di]])    }    if (ti != loadedIdx) {        anyDM <- any.disk.matrix(data[[loadedIdx]], correlation[[loadedIdx]],             network[[loadedIdx]])        vCat(verbose && anyDM, 1, "Unloading dataset from RAM...")        dataEnv$matrix <- NULL        correlationEnv$matrix <- NULL        networkEnv$matrix <- NULL        gc()        anyDM <- any.disk.matrix(data[[ti]], correlation[[ti]],             network[[ti]])        vCat(verbose && anyDM, 1, "Loading matrices of dataset \"",             datasetNames[ti], "\" into RAM...", sep = "")        if (!is.null(data[[ti]])) {            dataEnv$matrix <- Scale(loadIntoRAM(data[[ti]]))
  Failed with error:
BLAS/LAPACK routine 'DORGQRNo transposeCo' gave error code -3
Skipping to next comparison
            gc()        }        else {            dataEnv$matrix <- NULL        }        correlationEnv$matrix <- loadIntoRAM(correlation[[ti]])        networkEnv$matrix <- loadIntoRAM(network[[ti]])        loadedIdx <- ti    }    if (is.null(data[[di]]) || is.null(data[[ti]])) {        perms <- PermutationProcedureNoData(discProps, correlationEnv$matrix,             networkEnv$matrix, moduleAssignments[[di]], modules[[di]],             nPerm, nThreads, model, verbose, vCat)    }    else {        perms <- PermutationProcedure(discProps, dataEnv$matrix,             correlationEnv$matrix, networkEnv$matrix, moduleAssignments[[di]],             modules[[di]], nPerm, nThreads, model, verbose, vCat)    }    observed <- perms$observed    if (nPerm > 0) {        nulls <- perms$nulls    }    else {        nulls <- NULL    }    if (nPerm > 0) {        vCat(verbose, 1, "Calculating P-values...")        if (model == "overlap") {            totalSize <- length(overlapVars)        }        else {            totalSize <- ncol(correlation[[ti]])        }        p.values <- permutationTest(nulls, observed, varsPres,             totalSize, alternative)    }    else {        p.values <- NULL        totalSize <- NULL    }    vCat(verbose, 1, "Collating results...")    res[[di]][[ti]] <- list(nulls = nulls, observed = observed,         p.values = p.values, nVarsPresent = varsPres, propVarsPresent = propVarsPres,         totalSize = totalSize, alternative = alternative, contingency = contingency)    res[[di]][[ti]] <- res[[di]][[ti]][!sapply(res[[di]][[ti]],         is.null)]    gc()}, error = function(e) {    warning("Failed with error:\n", e$message, "\nSkipping to next comparison",         immediate. = TRUE)})
10: modulePreservation(network = network_list, data = data_list,     correlation = correlation_list, moduleAssignments = labels_list,     nPerm = 1000, discovery = "discovery", test = "test")
An irrecoverable exception occurred. R is aborting now ...

Traceback:
 1: doWithOneRestart(return(expr), restart)
 2: withOneRestart(expr, restarts[[1L]])
 3: withRestarts({    .Internal(.signalCondition(simpleWarning(msg, call), msg,         call))    .Internal(.dfltWarn(msg, call))}, muffleWarning = function() NULL)
 4: .signalSimpleWarning("Failed with error:\nBLAS/LAPACK routine 'DORGQRNo transposeCo' gave error code -3\nSkipping to next comparison",     base::quote(value[[3L]](cond)))
 5: warning("Failed with error:\n", e$message, "\nSkipping to next comparison",     immediate. = TRUE)
 6: value[[3L]](cond)
 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 8: tryCatchList(expr, classes, parentenv, handlers)
 9: tryCatch({    vCat(verbose, 0, sep = "", "Calculating preservation of network subsets from dataset ",         "\"", datasetNames[di], "\"", " in dataset ", "\"", datasetNames[ti],         "\"", ".")    ct <- contingencyTable(moduleAssignments[c(di, ti)], modules[[di]],         nodelist[[ti]])    contingency <- ct$contingency    propVarsPres <- ct$propVarsPres    overlapVars <- ct$overlapVars    varsPres <- ct$varsPres    overlapModules <- ct$overlapModules    overlapAssignments <- ct$overlapAssignments    nStatistics <- ifelse(!is.null(data[[di]]) && !is.null(data[[ti]]),         7, 4)    nModules <- length(overlapModules)    if (di != loadedIdx) {        anyDM <- any.disk.matrix(data[[loadedIdx]], correlation[[loadedIdx]],             network[[loadedIdx]])        vCat(verbose && anyDM, 1, "Unloading dataset from RAM...")        dataEnv$matrix <- NULL        correlationEnv$matrix <- NULL        networkEnv$matrix <- NULL        gc()        anyDM <- any.disk.matrix(data[[di]], correlation[[di]],             network[[di]])        vCat(verbose && anyDM, 1, "Loading matrices of dataset \"",             datasetNames[di], "\" into RAM...", sep = "")        if (!is.null(data[[di]])) {            dataEnv$matrix <- Scale(loadIntoRAM(data[[di]]))            gc()        }        else {            dataEnv$matrix <- NULL        }        correlationEnv$matrix <- loadIntoRAM(correlation[[di]])        networkEnv$matrix <- loadIntoRAM(network[[di]])        loadedIdx <- di    }    vCat(verbose, 1, "Pre-computing network properties in dataset \"",         datasetNames[di], "\"...", sep = "")    if (is.null(data[[di]]) || is.null(data[[ti]])) {        discProps <- IntermediatePropertiesNoData(correlationEnv$matrix,             networkEnv$matrix, nodelist[[ti]], moduleAssignments[[di]],             modules[[di]])    }    else {        discProps <- IntermediateProperties(dataEnv$matrix, correlationEnv$matrix,             networkEnv$matrix, nodelist[[ti]], moduleAssignments[[di]],             modules[[di]])    }    if (ti != loadedIdx) {        anyDM <- any.disk.matrix(data[[loadedIdx]], correlation[[loadedIdx]],             network[[loadedIdx]])        vCat(verbose && anyDM, 1, "Unloading dataset from RAM...")        dataEnv$matrix <- NULL        correlationEnv$matrix <- NULL        networkEnv$matrix <- NULL        gc()        anyDM <- any.disk.matrix(data[[ti]], correlation[[ti]],             network[[ti]])        vCat(verbose && anyDM, 1, "Loading matrices of dataset \"",             datasetNames[ti], "\" into RAM...", sep = "")        if (!is.null(data[[ti]])) {            dataEnv$matrix <- Scale(loadIntoRAM(data[[ti]]))            gc()        }        else {            dataEnv$matrix <- NULL        }        correlationEnv$matrix <- loadIntoRAM(correlation[[ti]])        networkEnv$matrix <- loadIntoRAM(network[[ti]])        loadedIdx <- ti    }    if (is.null(data[[di]]) || is.null(data[[ti]])) {        perms <- PermutationProcedureNoData(discProps, correlationEnv$matrix,             networkEnv$matrix, moduleAssignments[[di]], modules[[di]],             nPerm, nThreads, model, verbose, vCat)    }    else {        perms <- PermutationProcedure(discProps, dataEnv$matrix,             correlationEnv$matrix, networkEnv$matrix, moduleAssignments[[di]],             modules[[di]], nPerm, nThreads, model, verbose, vCat)    }    observed <- perms$observed    if (nPerm > 0) {        nulls <- perms$nulls    }    else {        nulls <- NULL    }    if (nPerm > 0) {        vCat(verbose, 1, "Calculating P-values...")        if (model == "overlap") {            totalSize <- length(overlapVars)        }        else {            totalSize <- ncol(correlation[[ti]])        }        p.values <- permutationTest(nulls, observed, varsPres,             totalSize, alternative)    }    else {        p.values <- NULL        totalSize <- NULL    }    vCat(verbose, 1, "Collating results...")    res[[di]][[ti]] <- list(nulls = nulls, observed = observed,         p.values = p.values, nVarsPresent = varsPres, propVarsPresent = propVarsPres,         totalSize = totalSize, alternative = alternative, contingency = contingency)    res[[di]][[ti]] <- res[[di]][[ti]][!sapply(res[[di]][[ti]],         is.null)]    gc()}, error = function(e) {    warning("Failed with error:\n", e$message, "\nSkipping to next comparison",         immediate. = TRUE)})
10: modulePreservation(network = network_list, data = data_list,     correlation = correlation_list, moduleAssignments = labels_list,     nPerm = 1000, discovery = "discovery", test = "test")
An irrecoverable exception occurred. R is aborting now ...