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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Reaper-class
> ### Title: Class '"Reaper"'
> ### Aliases: Reaper-class Reaper getColors,Reaper-method
> ###   getSplit,Reaper-method getStyles,Reaper-method
> ###   makeFigures,Reaper-method
> ### Keywords: classes cluster
> 
> ### ** Examples
> 
> # Simulate  a data set with some structure
> set.seed(250264)
> sigma1 <- matrix(0, ncol=16, nrow=16)
> sigma1[1:7, 1:7] <- 0.7
> sigma1[8:14, 8:14] <- 0.3
> diag(sigma1) <- 1
> st <- SimThresher(sigma1, nSample=300)
> # Threshing is completed; now we can reap
> reap <- Reaper(st)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
Thresher
 --- call from context --- 
.findSignals(cleaned, fit, ng, linkage = linkage)
 --- call from argument --- 
if (class(temp) == "numeric") temp <- matrix(temp, nrow = 1)
 --- R stacktrace ---
where 1: .findSignals(cleaned, fit, ng, linkage = linkage)
where 2: Reaper(st)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (thresher, fit, nGroups, linkage = "ward.D2") 
{
    gassign <- predict(fit)
    featureNames <- lapply(1:nGroups, function(idx) {
        colnames(thresher@data)[gassign == idx]
    })
    foo <- as.matrix(as.data.frame(lapply(1:nGroups, function(idx) {
        y <- thresher@loadings[gassign == idx, 1:thresher@pcdim, 
            drop = FALSE]
        apply(y, 2, mean)
    })))
    if (any(is.nan(foo))) {
        cat("Robot FU!!\n", file = stderr())
        for (ii in 1:nrow(foo)) {
            cat(paste(foo[ii, ], collapse = "\t"), "\n", file = stderr())
        }
        cat("gassign:", paste(gassign, collapse = " "), "\n", 
            file = stderr())
        cat("pcdim:", thresher@pcdim, "\n", file = stderr())
        stop("Danger, Will Robinson")
    }
    if (ncol(foo) > 1) {
        temp <- sqrt(apply(foo^2, 2, cumsum))
        if (class(temp) == "numeric") 
            temp <- matrix(temp, nrow = 1)
        cumulative <- apply(temp, 2, sum)
        oc <- rev(order(cumulative))
        featureNames <- featureNames[oc]
        foo <- foo[, oc, drop = FALSE]
    }
    colnames(foo) <- paste("G", 1:nGroups, sep = "")
    u <- unitize(foo)
    mat <- t(u) %*% u
    mat[mat < -1] <- -1
    mat[mat > 1] <- 1
    degrees <- round(acos(mat) * 360/(2 * pi))
    diag(degrees) <- 0
    pcSamples <- thresher@spca@scores[, 1:thresher@pcdim]
    mark <- rep(FALSE, nGroups)
    signals <- list()
    members <- list()
    while (TRUE) {
        if (all(mark)) 
            break
        w <- which(!mark)[1]
        oppose <- (!mark & degrees[w, ] > 135)
        if (any(oppose)) {
            v <- which(oppose)
            if (length(v) > 1) {
                warning("should not be opposite to two different things")
                md <- max(degrees[w, ][!mark])
                v <- which(!mark & degrees[w, ] == md)[1]
            }
            signal <- matrix(foo[, w] - foo[, v], ncol = 1)
            meme <- list(LEFT = featureNames[w], RIGHT = featureNames[v])
            mark[c(v, w)] <- TRUE
        }
        else {
            signal <- matrix(foo[, w], ncol = 1)
            meme <- list(FEAT = featureNames[w])
            mark[w] <- TRUE
        }
        M <- length(signals)
        signals[[1 + M]] <- pcSamples %*% signal
        members[[1 + M]] <- meme
    }
    contSignal <- as.matrix(as.data.frame(signals))
    colnames(contSignal) <- paste("Sig", 1:length(signals), sep = "")
    conClust <- hclust(distanceMatrix(t(contSignal), "euclid"), 
        linkage)
    binSignal <- 1 * (contSignal > 0)
    binClust <- hclust(dist.binary(binSignal, method = 2), linkage)
    new("SignalSet", members = members, continuous = contSignal, 
        binary = binSignal, continuousClusters = conClust, binaryClusters = binClust)
}
<bytecode: 0x55893ef81d60>
<environment: namespace:Thresher>
 --- function search by body ---
Function .findSignals in namespace Thresher has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1