Error(s) in re-building vignettes:
  ...
--- re-building ‘amap.Rnw’ using Sweave
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
amap
 --- call from context --- 
hclustfun(distfun(x))
 --- call from argument --- 
if (class(x) == "exprSet") x <- Biobase::exprs(x)
 --- R stacktrace ---
where 1: hclustfun(distfun(x))
where 2: heatmap(as.matrix(USArrests), hclustfun = hcluster, distfun = function(u) {
    u
})
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/amap.Rcheck/vign_test/amap", 
    ser_elibs = "/home/hornik/tmp/scratch/RtmpTaBSnY/file2de3e7ad859.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x, method = "euclidean", diag = FALSE, upper = FALSE, 
    link = "complete", members = NULL, nbproc = 2, doubleprecision = TRUE) 
{
    if (class(x) == "exprSet") 
        x <- Biobase::exprs(x)
    if (!is.na(pmatch(method, "euclidian"))) 
        method <- "euclidean"
    METHODS <- c("euclidean", "maximum", "manhattan", "canberra", 
        "binary", "pearson", "correlation", "spearman", "kendall", 
        "abspearson", "abscorrelation")
    method <- pmatch(method, METHODS)
    if (is.na(method)) 
        stop("invalid distance method")
    if (method == -1) 
        stop("ambiguous distance method")
    N <- nrow(x <- as.matrix(x))
    METHODSLINKS <- c("ward", "single", "complete", "average", 
        "mcquitty", "median", "centroid", "centroid2")
    link <- pmatch(link, METHODSLINKS)
    if (is.na(link)) 
        stop("invalid clustering method")
    if (link == -1) 
        stop("ambiguous clustering method")
    if (N < 2) 
        stop("Must have n >= 2 objects to cluster")
    if (is.null(members)) 
        members <- rep(1, N)
    if (length(members) != N) 
        stop("Invalid length of members")
    n <- N
    precision <- 1
    if (doubleprecision) 
        precision <- 2
    hcl <- .C(C_hcluster, x = as.double(x), nr = as.integer(n), 
        nc = as.integer(ncol(x)), diag = as.integer(FALSE), method = as.integer(method), 
        iopt = as.integer(link), ia = integer(n), ib = integer(n), 
        order = integer(n), crit = double(n), members = as.double(members), 
        nbprocess = as.integer(nbproc), precision = as.integer(precision), 
        res = as.integer(1), NAOK = TRUE, PACKAGE = "amap")
    if (hcl$res == 2) 
        stop("Cannot allocate memory")
    if (hcl$res == 3) 
        stop("Missing values in distance Matrix")
    if (hcl$res == 1) 
        stop("Error")
    tree <- list(merge = cbind(hcl$ia[1:(N - 1)], hcl$ib[1:(N - 
        1)]), height = hcl$crit[1:(N - 1)], order = hcl$order, 
        labels = dimnames(x)[[1]], method = METHODSLINKS[link], 
        call = match.call(), dist.method = METHODS[method])
    class(tree) <- "hclust"
    tree
}
<bytecode: 0x55a2a87df4c8>
<environment: namespace:amap>
 --- function search by body ---
Function hcluster in namespace amap has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1