Error(s) in re-building vignettes:
  ...
--- re-building 'phtt.Snw' using Sweave
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("PC1"), d.max = d.max, sig2.hat = sig2.hat)
 --- call from argument --- 
if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else {
    if (class(Obj) == "pca.fit" | class(Obj) == "fpca.fit") {
        nr <- Obj$data.dim[1]
        nc <- Obj$data.dim[2]
        V.d <- Obj$Sd2 * (nr * nc)
        d.seq = seq.int(0, (length(V.d) - 1))
        obj <- list(V.d = V.d, nr = nr, nc = nc, d.seq = d.seq)
    }
    else {
        if (is.regular.panel(Obj)) 
            obj <- svd.pca(Obj)
        else {
            if (!is.vector(Obj[[1]]) | !is.numeric(Obj[[1]]) | 
                !is.numeric(Obj[[2]]) | length(Obj[[2]]) != 2) 
                stop(c("'Obj' does not have the correct form."))
            else {
                nr <- Obj[[2]][1]
                nc <- Obj[[2]][2]
                V.d <- Obj[[1]]
                d.seq = seq.int(0, (length(V.d) - 1))
                obj <- list(V.d = V.d, nr = nr, nc = nc, d.seq = d.seq)
            }
        }
    }
}
 --- R stacktrace ---
where 1: B.OptDim(Obj, criteria = c("PC1"), d.max = d.max, sig2.hat = sig2.hat)
where 2: doTryCatch(return(expr), name, parentenv, handler)
where 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 4: tryCatchList(expr, classes, parentenv, handlers)
where 5: 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 6: try(B.OptDim(Obj, criteria = c("PC1"), d.max = d.max, sig2.hat = sig2.hat))
where 7: EstDim(dim.criterion, Obj = Residu.mat, d.max = d.max, factor.dim = factor.dim, 
    sig2.hat = sig2.hat, level = level)
where 8: FUN(X[[i]], ...)
where 9: lapply(X = X, FUN = FUN, ...)
where 10: sapply(dim.criterion, function(dim.criterion) {
    EstDim(dim.criterion, Obj = Residu.mat, d.max = d.max, factor.dim = factor.dim, 
        sig2.hat = sig2.hat, level = level)[2]
})
where 11: as.matrix(sapply(dim.criterion, function(dim.criterion) {
    EstDim(dim.criterion, Obj = Residu.mat, d.max = d.max, factor.dim = factor.dim, 
        sig2.hat = sig2.hat, level = level)[2]
}))
where 12: KSS.default(formula = l.Consumption ~ l.Price + l.Income)
where 13: KSS(formula = l.Consumption ~ l.Price + l.Income)
where 14: eval(expr, .GlobalEnv)
where 15: eval(expr, .GlobalEnv)
where 16: withVisible(eval(expr, .GlobalEnv))
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(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 21: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 22: evalFunc(ce, options)
where 23: tryCatchList(expr, classes, parentenv, handlers)
where 24: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 25: driver$runcode(drobj, chunk, chunkopts)
where 26: utils::Sweave(...)
where 27: engine$weave(file, quiet = quiet, encoding = enc)
where 28: doTryCatch(return(expr), name, parentenv, handler)
where 29: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 30: tryCatchList(expr, classes, parentenv, handlers)
where 31: 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 32: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/phtt.Rcheck/vign_test/phtt", 
    ser_elibs = "/tmp/RtmpBv880A/file434b2ea6f444.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (Obj, criteria = c("PC1", "PC2", "PC3", "BIC3", "IC1", 
    "IC2", "IC3", "IPC1", "IPC2", "IPC3", "Eup.PC1", "Eup.IPC1"), 
    d.max = NULL, sig2.hat = NULL) 
{
    if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") 
        obj <- Obj
    else {
        if (class(Obj) == "pca.fit" | class(Obj) == "fpca.fit") {
            nr <- Obj$data.dim[1]
            nc <- Obj$data.dim[2]
            V.d <- Obj$Sd2 * (nr * nc)
            d.seq = seq.int(0, (length(V.d) - 1))
            obj <- list(V.d = V.d, nr = nr, nc = nc, d.seq = d.seq)
        }
        else {
            if (is.regular.panel(Obj)) 
                obj <- svd.pca(Obj)
            else {
                if (!is.vector(Obj[[1]]) | !is.numeric(Obj[[1]]) | 
                  !is.numeric(Obj[[2]]) | length(Obj[[2]]) != 
                  2) 
                  stop(c("'Obj' does not have the correct form."))
                else {
                  nr <- Obj[[2]][1]
                  nc <- Obj[[2]][2]
                  V.d <- Obj[[1]]
                  d.seq = seq.int(0, (length(V.d) - 1))
                  obj <- list(V.d = V.d, nr = nr, nc = nc, d.seq = d.seq)
                }
            }
        }
    }
    criteria <- match.arg(criteria, several.ok = TRUE)
    result <- bai.dim.opt(obj, d.max = d.max, sig2.hat = sig2.hat, 
        criteria = criteria)
    return(result)
}
<bytecode: 0x26586d8>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1