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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: connectivityScore
> ### Title: Function computing connectivity scores between two signatures
> ### Aliases: connectivityScore
> 
> ### ** Examples
> 
> xValue <- c(1,5,23,4,8,9,2,19,11,12,13)
> xSig <- c(0.01, 0.001, .97, 0.01,0.01,0.28,0.7,0.01,0.01,0.01,0.01)
> yValue <- c(1,5,10,4,8,19,22,19,11,12,13)
> ySig <- c(0.01, 0.001, .97,0.01, 0.01,0.78,0.9,0.01,0.01,0.01,0.01)
> xx <- cbind(xValue, xSig)
> yy <- cbind(yValue, ySig)
> rownames(xx) <- rownames(yy) <- c('1','2','3','4','5','6','7','8','9','10','11')
> data.cor <- connectivityScore(xx,yy,method="gwc", gwc.method="spearman", nperm=300)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
CoreGx
 --- call from context --- 
connectivityScore(xx, yy, method = "gwc", gwc.method = "spearman", 
    nperm = 300)
 --- call from argument --- 
if (class(x) != "matrix") {
    x <- as.matrix(x)
}
 --- R stacktrace ---
where 1: connectivityScore(xx, yy, method = "gwc", gwc.method = "spearman", 
    nperm = 300)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (x, y, method = c("gsea", "fgsea", "gwc"), nperm = 10000, 
    nthread = 1, gwc.method = c("spearman", "pearson"), ...) 
{
    method <- match.arg(method)
    gwc.method <- match.arg(gwc.method)
    if (class(x) != "matrix") {
        x <- as.matrix(x)
    }
    if (class(y) != "matrix") {
        y <- as.matrix(y)
    }
    if ((ncol(x) != 2 || ncol(y) != 2) && method == "gwc") {
        stop("x and y should have 2 columns: effect size and corresponding p-values")
    }
    if (method == "gsea") {
        method <- "fgsea"
        warning("Using fGSEA method to calculate GSEA")
    }
    if (method == "fgsea" && nrow(y) >= nrow(x)) {
        warning("GSEA method: query gene set (y) larger than signature (x)")
    }
    if (is.null(rownames(x)) || is.null(rownames(y)) || !length(intersect(rownames(x), 
        rownames(y)))) {
        stop("Row names of x and y are either missing or have no intersection")
    }
    if (nperm < 100) {
        stop("The minimum number of permutations for permutation testing is 100")
    }
    switch(method, fgsea = {
        y <- y[!is.na(y[, 1]), , drop = FALSE]
        x <- x[!is.na(x[, 1]), , drop = FALSE]
        gset <- cbind(gene = rownames(y), set = ifelse(as.numeric(y[, 
            1]) >= 0, "UP", "DOWN"))
        gset <- piano::loadGSC(gset)
        nes <- piano::runGSA(geneLevelStats = x[, 1], geneSetStat = "fgsea", 
            gsc = gset, nPerm = nperm + (nperm%%nthread), ncpus = nthread, 
            verbose = FALSE, adjMethod = "none", ...)
        nes$pDistinctDir <- nes$pDistinctDirUp
        nes$pDistinctDir[is.na(nes$pDistinctDirUp), 1] <- nes$pDistinctDirDn[is.na(nes$pDistinctDirUp), 
            1]
        nes.up <- c(nes$statDistinctDir[which(names(nes$gsc) == 
            "UP"), 1], nes$pDistinctDir[which(names(nes$gsc) == 
            "UP"), 1])
        nes.down <- c(nes$statDistinctDir[which(names(nes$gsc) == 
            "DOWN"), 1], nes$pDistinctDir[which(names(nes$gsc) == 
            "DOWN"), 1])
        if (length(nes.up) == 0) {
            score = c(es = -nes.down[1], p = nes.down[2])
        } else if (length(nes.down) == 0) {
            score = c(es = nes.up[1], p = nes.up[2])
        } else if (complete.cases(cbind(nes.up, nes.down)) && 
            sign(nes.up[1]) != sign(nes.down[1])) {
            score <- c(es = (nes.up[1] - nes.down[1])/2, p = combineTest(p = c(nes.up[2], 
                nes.down[2]), method = "fisher", na.rm = TRUE))
        } else {
            score <- c(score = 0, p = 1)
        }
    }, gwc = {
        ii <- intersect(rownames(x), rownames(y))
        if (length(ii) < 10) {
            stop("Less than 10 probes/genes in common between x and y")
        }
        score <- gwc(x1 = x[ii, 1], p1 = x[ii, 2], x2 = y[ii, 
            1], p2 = y[ii, 2], method.cor = gwc.method, nperm = nperm, 
            ...)
        names(score) <- c("score", "p")
    })
    return(score)
}
<bytecode: 0x561e55ea7788>
<environment: namespace:CoreGx>
 --- function search by body ---
Function connectivityScore in namespace CoreGx has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1