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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("PC2"), 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("PC2"), 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("PC2"), 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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("PC3"), 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("PC3"), 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("PC3"), 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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("BIC3"), 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("BIC3"), 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("BIC3"), 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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("IC1"), 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("IC1"), 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("IC1"), 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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("IC2"), 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("IC2"), 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("IC2"), 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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("IC3"), 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("IC3"), 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("IC3"), 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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("IPC1"), 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("IPC1"), 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("IPC1"), 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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("IPC2"), 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("IPC2"), 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("IPC2"), 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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
B.OptDim(Obj, criteria = c("IPC3"), 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("IPC3"), 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("IPC3"), 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/RtmpUzW9I7/file19a619e269b7.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: 0x31b4238>
<environment: namespace:phtt>
 --- function search by body ---
Function B.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
KSS.OptDim(Obj, criteria = c("KSS.C"), sig2.hat = sig2.hat, alpha = level, 
    spar = spar, factor.dim = factor.dim, d.max = d.max)
 --- call from argument --- 
if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") {
    if (class(Obj) == "fsvd.pca") 
        obj <- Obj
    else {
        nr <- Obj$nr
        nc <- Obj$nc
        spar.low <- ifelse(is.null(spar), 0, spar)
        Q.orig <- Obj$Q.orig
        Q.orig.smth <- NULL
        L <- Obj$L
        V.d <- Obj$V.d
        obj <- list(nr = nr, nc = nc, spar.low = spar.low, Q.orig = Q.orig, 
            Q.orig.smth = Q.orig.smth, L = L, V.d = V.d)
    }
}
 --- R stacktrace ---
where 1: KSS.OptDim(Obj, criteria = c("KSS.C"), sig2.hat = sig2.hat, alpha = level, 
    spar = spar, factor.dim = factor.dim, d.max = d.max)
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(KSS.OptDim(Obj, criteria = c("KSS.C"), sig2.hat = sig2.hat, 
    alpha = level, spar = spar, factor.dim = factor.dim, d.max = d.max)[[1]])
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/RtmpUzW9I7/file19a619e269b7.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (Obj, criteria = c("KSS.C", "KSS.C2"), sig2.hat = NULL, 
    alpha = 0.01, d.max = NULL, factor.dim = NULL, spar = NULL) 
{
    if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") {
        if (class(Obj) == "fsvd.pca") 
            obj <- Obj
        else {
            nr <- Obj$nr
            nc <- Obj$nc
            spar.low <- ifelse(is.null(spar), 0, spar)
            Q.orig <- Obj$Q.orig
            Q.orig.smth <- NULL
            L <- Obj$L
            V.d <- Obj$V.d
            obj <- list(nr = nr, nc = nc, spar.low = spar.low, 
                Q.orig = Q.orig, Q.orig.smth = Q.orig.smth, L = L, 
                V.d = V.d)
        }
    }
    if (class(Obj) == "pca.fit" | class(Obj) == "fpca.fit") {
        if (class(Obj) == "fpca.fit") {
            nr <- Obj$data.dim[1]
            nc <- Obj$data.dim[2]
            spar.low <- Obj$spar.low
            Q.orig <- Obj$orig.values
            Q.orig.smth <- Obj$orig.values.smth
            L <- Obj$L
            V.d <- Obj$Sd2 * (nr * nc)
            obj <- list(nr = nr, nc = nc, spar.low = spar.low, 
                Q.orig = Q.orig, Q.orig.smth = Q.orig.smth, L = L, 
                V.d = V.d)
        }
        else {
            nr <- Obj$data.dim[1]
            nc <- Obj$data.dim[2]
            spar.low <- ifelse(is.null(spar), 0, spar)
            Q.orig <- Obj$orig.values
            Q.orig.smth <- NULL
            L <- Obj$L
            V.d <- Obj$Sd2 * (nr * nc)
            obj <- list(nr = nr, nc = nc, spar.low = spar.low, 
                Q.orig = Q.orig, Q.orig.smth = Q.orig.smth, L = L, 
                V.d = V.d)
        }
    }
    else {
        if (is.matrix(Obj)) {
            Obj <- fpca.fit(dat = Obj, given.d = factor.dim, 
                spar = spar)
            nr <- Obj$data.dim[1]
            nc <- Obj$data.dim[2]
            spar.low <- Obj$spar.low
            Q.orig <- Obj$orig.values
            Q.orig.smth <- Obj$orig.values.smth
            L <- Obj$L
            V.d <- Obj$Sd2 * (nr * nc)
            obj <- list(nr = nr, nc = nc, spar.low = spar.low, 
                Q.orig = Q.orig, Q.orig.smth = Q.orig.smth, L = L, 
                V.d = V.d)
        }
    }
    result <- KSS.dim.opt(obj, sig2.hat = sig2.hat, alpha = alpha, 
        factor.dim = factor.dim, d.max = d.max)
    criteria <- match.arg(criteria, several.ok = TRUE)
    Result <- vector("list", 2)
    Result[[1]] <- result[[1]][result[[1]][, 1] %in% criteria, 
        ]
    Result[[2]] <- result[[2]]
    return(Result)
}
<bytecode: 0x315e288>
<environment: namespace:phtt>
 --- function search by body ---
Function KSS.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
O.OptDim(Obj, d.max = d.max)
 --- 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)
        E <- Obj$eigen.values * (nr * nc)
        obj <- list(V.d = V.d, nr = nr, nc = nc, E = E)
    }
    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]][-length(Obj[[1]])]
                E <- -diff(Obj[[1]] - Obj[[1]][1])
                obj <- list(V.d = V.d, nr = nr, nc = nc, E = E)
            }
        }
    }
}
 --- R stacktrace ---
where 1: O.OptDim(Obj, d.max = d.max)
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(O.OptDim(Obj, d.max = d.max))
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/RtmpUzW9I7/file19a619e269b7.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (Obj, d.max = 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)
            E <- Obj$eigen.values * (nr * nc)
            obj <- list(V.d = V.d, nr = nr, nc = nc, E = E)
        }
        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]][-length(Obj[[1]])]
                  E <- -diff(Obj[[1]] - Obj[[1]][1])
                  obj <- list(V.d = V.d, nr = nr, nc = nc, E = E)
                }
            }
        }
    }
    result <- onatski.dim.opt(obj, d.max = d.max)
    return(result)
}
<bytecode: 0x2707778>
<environment: namespace:phtt>
 --- function search by body ---
Function O.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
RH.OptDim(Obj, criteria = c("ER"), d.max = d.max)
 --- 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)
        E <- Obj$eigen.values * (nr * nc)
        d.seq <- seq.int(0, (length(V.d) - 1))
        obj <- list(V.d = V.d, nr = nr, nc = nc, E = E)
    }
    else {
        if (is.matrix(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]][-length(Obj[[1]])]
                E <- -diff(Obj[[1]] - Obj[[1]][1])
                d.seq = seq.int(0, (length(Obj[[1]]) - 1))
                obj <- list(V.d = V.d, nr = nr, nc = nc, E = E, 
                  d.seq = d.seq)
            }
        }
    }
}
 --- R stacktrace ---
where 1: RH.OptDim(Obj, criteria = c("ER"), d.max = d.max)
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(RH.OptDim(Obj, criteria = c("ER"), d.max = d.max))
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/RtmpUzW9I7/file19a619e269b7.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (Obj, criteria = c("ER", "GR"), d.max = 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)
            E <- Obj$eigen.values * (nr * nc)
            d.seq <- seq.int(0, (length(V.d) - 1))
            obj <- list(V.d = V.d, nr = nr, nc = nc, E = E)
        }
        else {
            if (is.matrix(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]][-length(Obj[[1]])]
                  E <- -diff(Obj[[1]] - Obj[[1]][1])
                  d.seq = seq.int(0, (length(Obj[[1]]) - 1))
                  obj <- list(V.d = V.d, nr = nr, nc = nc, E = E, 
                    d.seq = d.seq)
                }
            }
        }
    }
    result <- RH.dim.opt(obj, d.max = d.max)
    criteria <- match.arg(criteria, several.ok = TRUE)
    return(result[result[, 1] %in% criteria, ])
}
<bytecode: 0x315b088>
<environment: namespace:phtt>
 --- function search by body ---
Function RH.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
phtt
 --- call from context --- 
RH.OptDim(Obj, criteria = c("GR"), d.max = d.max)
 --- 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)
        E <- Obj$eigen.values * (nr * nc)
        d.seq <- seq.int(0, (length(V.d) - 1))
        obj <- list(V.d = V.d, nr = nr, nc = nc, E = E)
    }
    else {
        if (is.matrix(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]][-length(Obj[[1]])]
                E <- -diff(Obj[[1]] - Obj[[1]][1])
                d.seq = seq.int(0, (length(Obj[[1]]) - 1))
                obj <- list(V.d = V.d, nr = nr, nc = nc, E = E, 
                  d.seq = d.seq)
            }
        }
    }
}
 --- R stacktrace ---
where 1: RH.OptDim(Obj, criteria = c("GR"), d.max = d.max)
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(RH.OptDim(Obj, criteria = c("GR"), d.max = d.max))
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/RtmpUzW9I7/file19a619e269b7.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (Obj, criteria = c("ER", "GR"), d.max = 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)
            E <- Obj$eigen.values * (nr * nc)
            d.seq <- seq.int(0, (length(V.d) - 1))
            obj <- list(V.d = V.d, nr = nr, nc = nc, E = E)
        }
        else {
            if (is.matrix(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]][-length(Obj[[1]])]
                  E <- -diff(Obj[[1]] - Obj[[1]][1])
                  d.seq = seq.int(0, (length(Obj[[1]]) - 1))
                  obj <- list(V.d = V.d, nr = nr, nc = nc, E = E, 
                    d.seq = d.seq)
                }
            }
        }
    }
    result <- RH.dim.opt(obj, d.max = d.max)
    criteria <- match.arg(criteria, several.ok = TRUE)
    return(result[result[, 1] %in% criteria, ])
}
<bytecode: 0x315b088>
<environment: namespace:phtt>
 --- function search by body ---
Function RH.OptDim in namespace phtt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Obj) == "svd.pca" | class(Obj) == "fsvd.pca") obj <- Obj else { : 
  the condition has length > 1

Error: processing vignette 'phtt.Snw' failed with diagnostics:
 chunk 4 
Error in if (used.dim > 0) { : missing value where TRUE/FALSE needed

--- failed re-building 'phtt.Snw'

SUMMARY: processing the following file failed:
  'phtt.Snw'

Error: Vignette re-building failed.
Execution halted