Last updated on 2020-02-19 10:49:02 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 3.1.2 | 6.29 | 43.50 | 49.79 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 3.1.2 | 5.17 | 33.20 | 38.37 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 3.1.2 | 61.23 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 3.1.2 | 58.80 | ERROR | |||
r-devel-windows-ix86+x86_64 | 3.1.2 | 10.00 | 65.00 | 75.00 | NOTE | |
r-devel-windows-ix86+x86_64-gcc8 | 3.1.2 | 15.00 | 88.00 | 103.00 | NOTE | |
r-patched-linux-x86_64 | 3.1.2 | 4.44 | 46.52 | 50.96 | NOTE | |
r-patched-solaris-x86 | 3.1.2 | 81.80 | NOTE | |||
r-release-linux-x86_64 | 3.1.2 | 6.12 | 46.65 | 52.77 | NOTE | |
r-release-windows-ix86+x86_64 | 3.1.2 | 9.00 | 87.00 | 96.00 | NOTE | |
r-release-osx-x86_64 | 3.1.2 | NOTE | ||||
r-oldrel-windows-ix86+x86_64 | 3.1.2 | 7.00 | 64.00 | 71.00 | NOTE | |
r-oldrel-osx-x86_64 | 3.1.2 | NOTE |
Version: 3.1.2
Check: R code for possible problems
Result: NOTE
Eup.default: no visible global function definition for 'model.frame'
Eup.default: no visible global function definition for 'var'
Eup.inference: no visible global function definition for 'pnorm'
FUN.Eup: no visible global function definition for 'cor'
FUN.Eup: no visible global function definition for 'coef'
FUN.Eup: no visible global function definition for 'lm'
FUN.Pformula: no visible global function definition for 'model.frame'
FUN.Pformula: no visible global function definition for
'model.response'
FUN.Pformula: no visible global function definition for 'model.matrix'
FUN.iterate.GCV: no visible global function definition for 'coef'
FUN.iterate.GCV: no visible global function definition for 'lm'
KSS.CV : Outer.CV : Inner.CV: no visible global function definition for
'residuals'
KSS.CV : Outer.CV : Inner.CV: no visible global function definition for
'lm'
KSS.CV: no visible global function definition for 'optimize'
KSS.default: no visible global function definition for 'model.frame'
KSS.dim.opt: no visible global function definition for 'qnorm'
KSS.dim.opt: no visible global function definition for 'pnorm'
abc.OptDim: no visible binding for global variable 'var'
abc.OptDim: no visible global function definition for 'median'
abc.OptDim: no visible global function definition for 'par'
abc.OptDim: no visible global function definition for 'plot'
abc.OptDim: no visible global function definition for 'abline'
abc.OptDim: no visible global function definition for 'points'
abc.OptDim: no visible global function definition for 'matplot'
checkSpecif: no visible global function definition for 'pchisq'
checkSpecif: no visible global function definition for 'qchisq'
coef.Eup: no visible binding for global variable 'var'
coef.Eup: no visible global function definition for 'var'
coef.KSS: no visible binding for global variable 'var'
coef.KSS: no visible global function definition for 'var'
coef.summary.Eup: no visible binding for global variable 'var'
coef.summary.Eup: no visible global function definition for 'var'
onatski.dim.opt: no visible global function definition for 'coef'
onatski.dim.opt: no visible global function definition for 'lm.fit'
plot.OptDim: no visible global function definition for 'rainbow'
plot.OptDim: no visible global function definition for 'barplot'
plot.OptDim: no visible global function definition for 'axis'
plot.OptDim: no visible global function definition for 'abline'
plot.OptDim: no visible global function definition for 'text'
plot.summary.Eup: no visible global function definition for 'coef'
plot.summary.Eup: no visible global function definition for 'par'
plot.summary.Eup: no visible global function definition for 'matplot'
plot.summary.Eup: no visible global function definition for 'plot.ts'
plot.summary.KSS: no visible global function definition for 'par'
plot.summary.KSS: no visible global function definition for 'matplot'
plot.summary.KSS: no visible global function definition for 'plot.ts'
print.summary.Eup: no visible global function definition for
'printCoefmat'
print.summary.KSS: no visible global function definition for
'printCoefmat'
standardize : <anonymous>: no visible global function definition for
'var'
summary.Eup: no visible global function definition for 'var'
summary.KSS: no visible global function definition for 'coef'
summary.KSS: no visible global function definition for 'pnorm'
Undefined global functions or variables:
abline axis barplot coef cor lm lm.fit matplot median model.frame
model.matrix model.response optimize par pchisq plot plot.ts pnorm
points printCoefmat qchisq qnorm rainbow residuals text var
Consider adding
importFrom("grDevices", "rainbow")
importFrom("graphics", "abline", "axis", "barplot", "matplot", "par",
"plot", "points", "text")
importFrom("stats", "coef", "cor", "lm", "lm.fit", "median",
"model.frame", "model.matrix", "model.response", "optimize",
"pchisq", "plot.ts", "pnorm", "printCoefmat", "qchisq",
"qnorm", "residuals", "var")
to your NAMESPACE file.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64, r-devel-windows-ix86+x86_64-gcc8, r-patched-linux-x86_64, r-patched-solaris-x86, r-release-linux-x86_64, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64
Version: 3.1.2
Check: examples
Result: ERROR
Running examples in 'phtt-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: KSS
> ### Title: KSS-Routine
> ### Aliases: KSS KSS.default
>
> ### ** Examples
>
> ## See the example in 'help(Cigar)' in order to take a look at the
> ## data set Cigar
>
> ##########
> ## DATA ##
> ##########
>
> data(Cigar)
> ## Panel-Dimensions:
> N <- 46
> T <- 30
> ## Dependent variable:
> ## Cigarette-Sales per Capita
> l.Consumption <- log(matrix(Cigar$sales, T,N))
> ## Independent variables:
> ## Consumer Price Index
> cpi <- matrix(Cigar$cpi, T,N)
> ## Real Price per Pack of Cigarettes
> l.Price <- log(matrix(Cigar$price, T,N)/cpi)
> ## Real Disposable Income per Capita
> l.Income <- log(matrix(Cigar$ndi, T,N)/cpi)
>
> ## Estimation:
> KSS.fit <- KSS(l.Consumption~l.Price+l.Income, CV=TRUE)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
phtt
--- call from context ---
OptDim.default(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
--- call from argument ---
if (class(Obj) == "KSS" | class(Obj) == "Eup") Obj <- Obj$unob.fact.stru +
Obj$residuals else is.regular.panel(Obj, stopper = TRUE)
--- R stacktrace ---
where 1: OptDim.default(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
where 2: OptDim(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
where 3: KSS.CV(kappa.interv = c(.Machine$double.eps, spar.interval.max),
Y = TR.Y, X = TR.X, N = N, T = T, P = P, spar.dim.fit = spar.low,
tol = convergence)
where 4: KSS.default(l.Consumption ~ l.Price + l.Income, CV = TRUE)
where 5: KSS(l.Consumption ~ l.Price + l.Income, CV = TRUE)
--- 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", "ABC.IC1", "ABC.IC2",
"KSS.C", "ED", "ER", "GR"), standardize = FALSE, d.max, sig2.hat,
spar, level = 0.01, c.grid = seq(0, 5, length.out = 128),
T.seq, n.seq)
{
if (class(Obj) == "KSS" | class(Obj) == "Eup")
Obj <- Obj$unob.fact.stru + Obj$residuals
else is.regular.panel(Obj, stopper = TRUE)
if (missing(d.max))
d.max <- NULL
if (missing(sig2.hat))
sig2.hat <- NULL
if (missing(spar))
spar <- NULL
if (missing(c.grid))
c.grid <- NULL
if (missing(T.seq))
T.seq <- NULL
if (missing(n.seq))
n.seq <- NULL
if (standardize)
Obj <- standardize(Obj)
criteria <- match.arg(criteria, several.ok = TRUE)
checkBai <- criteria %in% c("PC1", "PC2", "PC3", "BIC3",
"IC1", "IC2", "IC3", "IPC1", "IPC2", "IPC3", "Eup.PC1",
"Eup.IPC1")
if (any(checkBai)) {
BaiS <- try(B.OptDim(Obj, criteria = criteria[checkBai],
d.max = d.max, sig2.hat = sig2.hat))
}
checkOnat <- criteria %in% c("ED")
if (any(checkOnat)) {
OnatS <- try(O.OptDim(Obj, d.max = d.max))
}
checkRH <- criteria %in% c("ER", "GR")
if (any(checkRH)) {
RHS <- try(RH.OptDim(Obj, criteria = criteria[checkRH],
d.max = d.max))
}
checkKSS <- criteria %in% c("KSS.C")
if (any(checkKSS)) {
KSSS <- try(KSS.OptDim(Obj, criteria = c("KSS.C"), sig2.hat = sig2.hat,
alpha = level, factor.dim = NULL, d.max = d.max,
spar = spar)[[1]])
}
checkABC <- criteria %in% c("ABC.IC1", "ABC.IC2", "DCPC")
if (any(checkABC)) {
ABCS <- try(abc.OptDim(Obj, criteria = criteria[checkABC],
c.grid = c.grid, n.seq = n.seq, T.seq = T.seq, d.max = d.max))
}
ll <- length(criteria)
Result <- vector(mode = "list", ll)
for (l in 1:ll) {
if (checkBai[l])
Result[[l]] <- BaiS[BaiS[, 1] == criteria[l], ]
else {
if (checkOnat[l])
Result[[l]] <- OnatS
else {
if (checkRH[l])
Result[[l]] <- RHS[RHS[, 1] == criteria[l],
]
else {
if (checkKSS[l])
Result[[l]] <- KSSS
else {
if (checkABC[l])
Result[[l]] <- ABCS[ABCS[, 1] == criteria[l],
]
}
}
}
}
}
summary <- sapply(1:length(criteria), function(l) Result[[l]][,
1:2])
Summary <- matrix(as.numeric(summary[2, ]), ncol(summary))
colnames(Summary) <- " "
rownames(Summary) <- summary[1, ]
Summary <- t(Summary)
Result$summary <- Summary
Result$criteria <- criteria
Result$BaiNgC <- criteria %in% c("PC1", "PC2", "PC3", "BIC3",
"IC1", "IC2", "IC3")
Result$BaiC <- criteria %in% c("IPC1", "IPC2", "IPC3")
Result$KSSC <- checkKSS
Result$OnatC <- checkOnat
Result$RHC <- checkRH
Result$EupC <- criteria %in% c("Eup.PC1", "Eup.IPC1")
Result$ABCC <- criteria %in% c("ABC.IC1", "ABC.IC2")
Result$BadaC <- criteria %in% c("DCPC")
Result$cl <- match.call()
Result$obj <- Obj
structure(Result, class = "OptDim")
}
<bytecode: 0x360a6e8>
<environment: namespace:phtt>
--- function search by body ---
Function OptDim.default in namespace phtt has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(Obj) == "KSS" | class(Obj) == "Eup") Obj <- Obj$unob.fact.stru + :
the condition has length > 1
Calls: KSS -> KSS.default -> KSS.CV -> OptDim -> OptDim.default
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 3.1.2
Check: re-building of vignette outputs
Result: WARN
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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x1644880>
<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/RtmpgsnERP/filefaa5c51473d.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: 0xbd5f88>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x2375490>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x11ca250>
<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/RtmpgsnERP/filefaa5c51473d.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: 0x11ca250>
<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
Flavor: r-devel-linux-x86_64-debian-clang
Version: 3.1.2
Check: examples
Result: ERROR
Running examples in ‘phtt-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: KSS
> ### Title: KSS-Routine
> ### Aliases: KSS KSS.default
>
> ### ** Examples
>
> ## See the example in 'help(Cigar)' in order to take a look at the
> ## data set Cigar
>
> ##########
> ## DATA ##
> ##########
>
> data(Cigar)
> ## Panel-Dimensions:
> N <- 46
> T <- 30
> ## Dependent variable:
> ## Cigarette-Sales per Capita
> l.Consumption <- log(matrix(Cigar$sales, T,N))
> ## Independent variables:
> ## Consumer Price Index
> cpi <- matrix(Cigar$cpi, T,N)
> ## Real Price per Pack of Cigarettes
> l.Price <- log(matrix(Cigar$price, T,N)/cpi)
> ## Real Disposable Income per Capita
> l.Income <- log(matrix(Cigar$ndi, T,N)/cpi)
>
> ## Estimation:
> KSS.fit <- KSS(l.Consumption~l.Price+l.Income, CV=TRUE)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
phtt
--- call from context ---
OptDim.default(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
--- call from argument ---
if (class(Obj) == "KSS" | class(Obj) == "Eup") Obj <- Obj$unob.fact.stru +
Obj$residuals else is.regular.panel(Obj, stopper = TRUE)
--- R stacktrace ---
where 1: OptDim.default(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
where 2: OptDim(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
where 3: KSS.CV(kappa.interv = c(.Machine$double.eps, spar.interval.max),
Y = TR.Y, X = TR.X, N = N, T = T, P = P, spar.dim.fit = spar.low,
tol = convergence)
where 4: KSS.default(l.Consumption ~ l.Price + l.Income, CV = TRUE)
where 5: KSS(l.Consumption ~ l.Price + l.Income, CV = TRUE)
--- 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", "ABC.IC1", "ABC.IC2",
"KSS.C", "ED", "ER", "GR"), standardize = FALSE, d.max, sig2.hat,
spar, level = 0.01, c.grid = seq(0, 5, length.out = 128),
T.seq, n.seq)
{
if (class(Obj) == "KSS" | class(Obj) == "Eup")
Obj <- Obj$unob.fact.stru + Obj$residuals
else is.regular.panel(Obj, stopper = TRUE)
if (missing(d.max))
d.max <- NULL
if (missing(sig2.hat))
sig2.hat <- NULL
if (missing(spar))
spar <- NULL
if (missing(c.grid))
c.grid <- NULL
if (missing(T.seq))
T.seq <- NULL
if (missing(n.seq))
n.seq <- NULL
if (standardize)
Obj <- standardize(Obj)
criteria <- match.arg(criteria, several.ok = TRUE)
checkBai <- criteria %in% c("PC1", "PC2", "PC3", "BIC3",
"IC1", "IC2", "IC3", "IPC1", "IPC2", "IPC3", "Eup.PC1",
"Eup.IPC1")
if (any(checkBai)) {
BaiS <- try(B.OptDim(Obj, criteria = criteria[checkBai],
d.max = d.max, sig2.hat = sig2.hat))
}
checkOnat <- criteria %in% c("ED")
if (any(checkOnat)) {
OnatS <- try(O.OptDim(Obj, d.max = d.max))
}
checkRH <- criteria %in% c("ER", "GR")
if (any(checkRH)) {
RHS <- try(RH.OptDim(Obj, criteria = criteria[checkRH],
d.max = d.max))
}
checkKSS <- criteria %in% c("KSS.C")
if (any(checkKSS)) {
KSSS <- try(KSS.OptDim(Obj, criteria = c("KSS.C"), sig2.hat = sig2.hat,
alpha = level, factor.dim = NULL, d.max = d.max,
spar = spar)[[1]])
}
checkABC <- criteria %in% c("ABC.IC1", "ABC.IC2", "DCPC")
if (any(checkABC)) {
ABCS <- try(abc.OptDim(Obj, criteria = criteria[checkABC],
c.grid = c.grid, n.seq = n.seq, T.seq = T.seq, d.max = d.max))
}
ll <- length(criteria)
Result <- vector(mode = "list", ll)
for (l in 1:ll) {
if (checkBai[l])
Result[[l]] <- BaiS[BaiS[, 1] == criteria[l], ]
else {
if (checkOnat[l])
Result[[l]] <- OnatS
else {
if (checkRH[l])
Result[[l]] <- RHS[RHS[, 1] == criteria[l],
]
else {
if (checkKSS[l])
Result[[l]] <- KSSS
else {
if (checkABC[l])
Result[[l]] <- ABCS[ABCS[, 1] == criteria[l],
]
}
}
}
}
}
summary <- sapply(1:length(criteria), function(l) Result[[l]][,
1:2])
Summary <- matrix(as.numeric(summary[2, ]), ncol(summary))
colnames(Summary) <- " "
rownames(Summary) <- summary[1, ]
Summary <- t(Summary)
Result$summary <- Summary
Result$criteria <- criteria
Result$BaiNgC <- criteria %in% c("PC1", "PC2", "PC3", "BIC3",
"IC1", "IC2", "IC3")
Result$BaiC <- criteria %in% c("IPC1", "IPC2", "IPC3")
Result$KSSC <- checkKSS
Result$OnatC <- checkOnat
Result$RHC <- checkRH
Result$EupC <- criteria %in% c("Eup.PC1", "Eup.IPC1")
Result$ABCC <- criteria %in% c("ABC.IC1", "ABC.IC2")
Result$BadaC <- criteria %in% c("DCPC")
Result$cl <- match.call()
Result$obj <- Obj
structure(Result, class = "OptDim")
}
<bytecode: 0x55bc3d960198>
<environment: namespace:phtt>
--- function search by body ---
Function OptDim.default in namespace phtt has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(Obj) == "KSS" | class(Obj) == "Eup") Obj <- Obj$unob.fact.stru + :
the condition has length > 1
Calls: KSS -> KSS.default -> KSS.CV -> OptDim -> OptDim.default
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 3.1.2
Check: re-building of vignette outputs
Result: WARN
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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df8c4ca60>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df81e0570>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df997f140>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df87d4100>
<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-gcc/Work/PKGS/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/home/hornik/tmp/scratch/Rtmp0XGNJR/file557671dc22e9.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: 0x556df87d4100>
<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
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 3.1.2
Check: examples
Result: ERROR
Running examples in ‘phtt-Ex.R’ failed
The error most likely occurred in:
> ### Name: KSS
> ### Title: KSS-Routine
> ### Aliases: KSS KSS.default
>
> ### ** Examples
>
> ## See the example in 'help(Cigar)' in order to take a look at the
> ## data set Cigar
>
> ##########
> ## DATA ##
> ##########
>
> data(Cigar)
> ## Panel-Dimensions:
> N <- 46
> T <- 30
> ## Dependent variable:
> ## Cigarette-Sales per Capita
> l.Consumption <- log(matrix(Cigar$sales, T,N))
> ## Independent variables:
> ## Consumer Price Index
> cpi <- matrix(Cigar$cpi, T,N)
> ## Real Price per Pack of Cigarettes
> l.Price <- log(matrix(Cigar$price, T,N)/cpi)
> ## Real Disposable Income per Capita
> l.Income <- log(matrix(Cigar$ndi, T,N)/cpi)
>
> ## Estimation:
> KSS.fit <- KSS(l.Consumption~l.Price+l.Income, CV=TRUE)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
phtt
--- call from context ---
OptDim.default(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
--- call from argument ---
if (class(Obj) == "KSS" | class(Obj) == "Eup") Obj <- Obj$unob.fact.stru +
Obj$residuals else is.regular.panel(Obj, stopper = TRUE)
--- R stacktrace ---
where 1: OptDim.default(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
where 2: OptDim(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
where 3: KSS.CV(kappa.interv = c(.Machine$double.eps, spar.interval.max),
Y = TR.Y, X = TR.X, N = N, T = T, P = P, spar.dim.fit = spar.low,
tol = convergence)
where 4: KSS.default(l.Consumption ~ l.Price + l.Income, CV = TRUE)
where 5: KSS(l.Consumption ~ l.Price + l.Income, CV = TRUE)
--- 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", "ABC.IC1", "ABC.IC2",
"KSS.C", "ED", "ER", "GR"), standardize = FALSE, d.max, sig2.hat,
spar, level = 0.01, c.grid = seq(0, 5, length.out = 128),
T.seq, n.seq)
{
if (class(Obj) == "KSS" | class(Obj) == "Eup")
Obj <- Obj$unob.fact.stru + Obj$residuals
else is.regular.panel(Obj, stopper = TRUE)
if (missing(d.max))
d.max <- NULL
if (missing(sig2.hat))
sig2.hat <- NULL
if (missing(spar))
spar <- NULL
if (missing(c.grid))
c.grid <- NULL
if (missing(T.seq))
T.seq <- NULL
if (missing(n.seq))
n.seq <- NULL
if (standardize)
Obj <- standardize(Obj)
criteria <- match.arg(criteria, several.ok = TRUE)
checkBai <- criteria %in% c("PC1", "PC2", "PC3", "BIC3",
"IC1", "IC2", "IC3", "IPC1", "IPC2", "IPC3", "Eup.PC1",
"Eup.IPC1")
if (any(checkBai)) {
BaiS <- try(B.OptDim(Obj, criteria = criteria[checkBai],
d.max = d.max, sig2.hat = sig2.hat))
}
checkOnat <- criteria %in% c("ED")
if (any(checkOnat)) {
OnatS <- try(O.OptDim(Obj, d.max = d.max))
}
checkRH <- criteria %in% c("ER", "GR")
if (any(checkRH)) {
RHS <- try(RH.OptDim(Obj, criteria = criteria[checkRH],
d.max = d.max))
}
checkKSS <- criteria %in% c("KSS.C")
if (any(checkKSS)) {
KSSS <- try(KSS.OptDim(Obj, criteria = c("KSS.C"), sig2.hat = sig2.hat,
alpha = level, factor.dim = NULL, d.max = d.max,
spar = spar)[[1]])
}
checkABC <- criteria %in% c("ABC.IC1", "ABC.IC2", "DCPC")
if (any(checkABC)) {
ABCS <- try(abc.OptDim(Obj, criteria = criteria[checkABC],
c.grid = c.grid, n.seq = n.seq, T.seq = T.seq, d.max = d.max))
}
ll <- length(criteria)
Result <- vector(mode = "list", ll)
for (l in 1:ll) {
if (checkBai[l])
Result[[l]] <- BaiS[BaiS[, 1] == criteria[l], ]
else {
if (checkOnat[l])
Result[[l]] <- OnatS
else {
if (checkRH[l])
Result[[l]] <- RHS[RHS[, 1] == criteria[l],
]
else {
if (checkKSS[l])
Result[[l]] <- KSSS
else {
if (checkABC[l])
Result[[l]] <- ABCS[ABCS[, 1] == criteria[l],
]
}
}
}
}
}
summary <- sapply(1:length(criteria), function(l) Result[[l]][,
1:2])
Summary <- matrix(as.numeric(summary[2, ]), ncol(summary))
colnames(Summary) <- " "
rownames(Summary) <- summary[1, ]
Summary <- t(Summary)
Result$summary <- Summary
Result$criteria <- criteria
Result$BaiNgC <- criteria %in% c("PC1", "PC2", "PC3", "BIC3",
"IC1", "IC2", "IC3")
Result$BaiC <- criteria %in% c("IPC1", "IPC2", "IPC3")
Result$KSSC <- checkKSS
Result$OnatC <- checkOnat
Result$RHC <- checkRH
Result$EupC <- criteria %in% c("Eup.PC1", "Eup.IPC1")
Result$ABCC <- criteria %in% c("ABC.IC1", "ABC.IC2")
Result$BadaC <- criteria %in% c("DCPC")
Result$cl <- match.call()
Result$obj <- Obj
structure(Result, class = "OptDim")
}
<bytecode: 0x2e9dfc8>
<environment: namespace:phtt>
--- function search by body ---
Function OptDim.default in namespace phtt has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(Obj) == "KSS" | class(Obj) == "Eup") Obj <- Obj$unob.fact.stru + :
the condition has length > 1
Calls: KSS -> KSS.default -> KSS.CV -> OptDim -> OptDim.default
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 3.1.2
Check: re-building of vignette outputs
Result: WARN
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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1519928>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x10683e0>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x1d77908>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x27f3e08>
<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 = "/data/gannet/ripley/R/packages/tests-clang/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpuoJE3k/file4f4673745879.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: 0x27f3e08>
<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
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 3.1.2
Check: examples
Result: ERROR
Running examples in ‘phtt-Ex.R’ failed
The error most likely occurred in:
> ### Name: KSS
> ### Title: KSS-Routine
> ### Aliases: KSS KSS.default
>
> ### ** Examples
>
> ## See the example in 'help(Cigar)' in order to take a look at the
> ## data set Cigar
>
> ##########
> ## DATA ##
> ##########
>
> data(Cigar)
> ## Panel-Dimensions:
> N <- 46
> T <- 30
> ## Dependent variable:
> ## Cigarette-Sales per Capita
> l.Consumption <- log(matrix(Cigar$sales, T,N))
> ## Independent variables:
> ## Consumer Price Index
> cpi <- matrix(Cigar$cpi, T,N)
> ## Real Price per Pack of Cigarettes
> l.Price <- log(matrix(Cigar$price, T,N)/cpi)
> ## Real Disposable Income per Capita
> l.Income <- log(matrix(Cigar$ndi, T,N)/cpi)
>
> ## Estimation:
> KSS.fit <- KSS(l.Consumption~l.Price+l.Income, CV=TRUE)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
phtt
--- call from context ---
OptDim.default(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
--- call from argument ---
if (class(Obj) == "KSS" | class(Obj) == "Eup") Obj <- Obj$unob.fact.stru +
Obj$residuals else is.regular.panel(Obj, stopper = TRUE)
--- R stacktrace ---
where 1: OptDim.default(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
where 2: OptDim(Obj = Residu.mat, criteria = "KSS.C", spar = spar.dim.fit)
where 3: KSS.CV(kappa.interv = c(.Machine$double.eps, spar.interval.max),
Y = TR.Y, X = TR.X, N = N, T = T, P = P, spar.dim.fit = spar.low,
tol = convergence)
where 4: KSS.default(l.Consumption ~ l.Price + l.Income, CV = TRUE)
where 5: KSS(l.Consumption ~ l.Price + l.Income, CV = TRUE)
--- 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", "ABC.IC1", "ABC.IC2",
"KSS.C", "ED", "ER", "GR"), standardize = FALSE, d.max, sig2.hat,
spar, level = 0.01, c.grid = seq(0, 5, length.out = 128),
T.seq, n.seq)
{
if (class(Obj) == "KSS" | class(Obj) == "Eup")
Obj <- Obj$unob.fact.stru + Obj$residuals
else is.regular.panel(Obj, stopper = TRUE)
if (missing(d.max))
d.max <- NULL
if (missing(sig2.hat))
sig2.hat <- NULL
if (missing(spar))
spar <- NULL
if (missing(c.grid))
c.grid <- NULL
if (missing(T.seq))
T.seq <- NULL
if (missing(n.seq))
n.seq <- NULL
if (standardize)
Obj <- standardize(Obj)
criteria <- match.arg(criteria, several.ok = TRUE)
checkBai <- criteria %in% c("PC1", "PC2", "PC3", "BIC3",
"IC1", "IC2", "IC3", "IPC1", "IPC2", "IPC3", "Eup.PC1",
"Eup.IPC1")
if (any(checkBai)) {
BaiS <- try(B.OptDim(Obj, criteria = criteria[checkBai],
d.max = d.max, sig2.hat = sig2.hat))
}
checkOnat <- criteria %in% c("ED")
if (any(checkOnat)) {
OnatS <- try(O.OptDim(Obj, d.max = d.max))
}
checkRH <- criteria %in% c("ER", "GR")
if (any(checkRH)) {
RHS <- try(RH.OptDim(Obj, criteria = criteria[checkRH],
d.max = d.max))
}
checkKSS <- criteria %in% c("KSS.C")
if (any(checkKSS)) {
KSSS <- try(KSS.OptDim(Obj, criteria = c("KSS.C"), sig2.hat = sig2.hat,
alpha = level, factor.dim = NULL, d.max = d.max,
spar = spar)[[1]])
}
checkABC <- criteria %in% c("ABC.IC1", "ABC.IC2", "DCPC")
if (any(checkABC)) {
ABCS <- try(abc.OptDim(Obj, criteria = criteria[checkABC],
c.grid = c.grid, n.seq = n.seq, T.seq = T.seq, d.max = d.max))
}
ll <- length(criteria)
Result <- vector(mode = "list", ll)
for (l in 1:ll) {
if (checkBai[l])
Result[[l]] <- BaiS[BaiS[, 1] == criteria[l], ]
else {
if (checkOnat[l])
Result[[l]] <- OnatS
else {
if (checkRH[l])
Result[[l]] <- RHS[RHS[, 1] == criteria[l],
]
else {
if (checkKSS[l])
Result[[l]] <- KSSS
else {
if (checkABC[l])
Result[[l]] <- ABCS[ABCS[, 1] == criteria[l],
]
}
}
}
}
}
summary <- sapply(1:length(criteria), function(l) Result[[l]][,
1:2])
Summary <- matrix(as.numeric(summary[2, ]), ncol(summary))
colnames(Summary) <- " "
rownames(Summary) <- summary[1, ]
Summary <- t(Summary)
Result$summary <- Summary
Result$criteria <- criteria
Result$BaiNgC <- criteria %in% c("PC1", "PC2", "PC3", "BIC3",
"IC1", "IC2", "IC3")
Result$BaiC <- criteria %in% c("IPC1", "IPC2", "IPC3")
Result$KSSC <- checkKSS
Result$OnatC <- checkOnat
Result$RHC <- checkRH
Result$EupC <- criteria %in% c("Eup.PC1", "Eup.IPC1")
Result$ABCC <- criteria %in% c("ABC.IC1", "ABC.IC2")
Result$BadaC <- criteria %in% c("DCPC")
Result$cl <- match.call()
Result$obj <- Obj
structure(Result, class = "OptDim")
}
<bytecode: 0x3139310>
<environment: namespace:phtt>
--- function search by body ---
Function OptDim.default in namespace phtt has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(Obj) == "KSS" | class(Obj) == "Eup") Obj <- Obj$unob.fact.stru + :
the condition has length > 1
Calls: KSS -> KSS.default -> KSS.CV -> OptDim -> OptDim.default
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 3.1.2
Check: re-building of vignette outputs
Result: WARN
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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x2230ab0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x13a8bb0>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0x1a1b480>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0xac8130>
<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 = "/data/gannet/ripley/R/packages/tests-devel/phtt.Rcheck/vign_test/phtt",
ser_elibs = "/tmp/RtmpcPkGX4/file300f3d62335c.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: 0xac8130>
<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
Flavor: r-devel-linux-x86_64-fedora-gcc