Error(s) in re-building vignettes:
  ...
--- re-building ‘Thresher.Rnw’ using Sweave
Loading required package: ClassDiscovery
Loading required package: cluster
Loading required package: oompaBase
Loading required package: PCDimension
 ----------- 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(thresh2)
where 3: eval(expr, .GlobalEnv)
where 4: eval(expr, .GlobalEnv)
where 5: withVisible(eval(expr, .GlobalEnv))
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, classes, parentenv, handlers)
where 9: 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)[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))
})
where 10: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 11: evalFunc(ce, options)
where 12: tryCatchList(expr, classes, parentenv, handlers)
where 13: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 14: driver$runcode(drobj, chunk, chunkopts)
where 15: utils::Sweave(...)
where 16: engine$weave(file, quiet = quiet, encoding = enc)
where 17: doTryCatch(return(expr), name, parentenv, handler)
where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 19: tryCatchList(expr, classes, parentenv, handlers)
where 20: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
    outputs <- c(outputs, output)
}, error = function(e) {
    thisOK <<- FALSE
    fails <<- c(fails, file)
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 21: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/Thresher.Rcheck/vign_test/Thresher", 
    ser_elibs = "/home/hornik/tmp/scratch/RtmpWnhj6I/file51e7633a1919.rds")

 --- 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: 0x558b2535d878>
<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