CRAN Package Check Results for Package SPOT

Last updated on 2019-11-26 00:52:13 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.0.4 10.81 108.66 119.47 ERROR
r-devel-linux-x86_64-debian-gcc 2.0.4 8.31 82.79 91.10 ERROR
r-devel-linux-x86_64-fedora-clang 2.0.4 165.40 OK
r-devel-linux-x86_64-fedora-gcc 2.0.4 155.08 OK
r-devel-windows-ix86+x86_64 2.0.4 45.00 185.00 230.00 OK
r-devel-windows-ix86+x86_64-gcc8 2.0.4 28.00 142.00 170.00 OK
r-patched-linux-x86_64 2.0.4 8.88 124.56 133.44 OK
r-patched-solaris-x86 2.0.4 232.00 OK
r-release-linux-x86_64 2.0.4 9.98 127.02 137.00 OK
r-release-windows-ix86+x86_64 2.0.4 45.00 179.00 224.00 OK
r-release-osx-x86_64 2.0.4 OK
r-oldrel-windows-ix86+x86_64 2.0.4 15.00 132.00 147.00 OK
r-oldrel-osx-x86_64 2.0.4 OK

Check Details

Version: 2.0.4
Check: examples
Result: ERROR
    Running examples in 'SPOT-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: buildEnsembleStack
    > ### Title: Ensemble: Stacking
    > ### Aliases: buildEnsembleStack
    >
    > ### ** Examples
    >
    > ## Create a test function: branin
    > braninFunction <- function (x) {
    + (x[2] - 5.1/(4 * pi^2) * (x[1] ^2) + 5/pi * x[1] - 6)^2 +
    + 10 * (1 - 1/(8 * pi)) * cos(x[1] ) + 10
    + }
    > ## Create design points
    > x <- cbind(runif(20)*15-5,runif(20)*15)
    > ## Compute observations at design points
    > y <- as.matrix(apply(x,1,braninFunction))
    > ## Create model with default settings
    > fit <- buildEnsembleStack(x,y)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SPOT
     --- call from context ---
    krigingLikelihood(x, fX, fy, optimizeP, useLambda)
     --- call from argument ---
    if (class(cholPsi) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA, mu = NA,
     SSQ = NA))
    }
     --- R stacktrace ---
    where 1: krigingLikelihood(x, fX, fy, optimizeP, useLambda)
    where 2: FUN(newX[, i], ...)
    where 3: apply(x, 1, fitFun, fX, fy, optimizeP, useLambda)
    where 4: fun(matrix(x, 1), ...)
    where 5: fn(par, ...)
    where 6: (function (par)
    fn(par, ...))(c(0.09, 0.09, 0))
    where 7: optim(par = x, fn = fn, lower = lower, upper = upper, control = control,
     method = "L-BFGS-B", ...)
    where 8: fit$algTheta(x = x0, fun = function(x, fX, fy, optimizeP, useLambda) {
     if (!is.matrix(x)) {
     fitFun(x, fX, fy, optimizeP, useLambda)
     }
     else {
     apply(x, 1, fitFun, fX, fy, optimizeP, useLambda)
     }
    }, lower = LowerTheta, upper = UpperTheta, control = opts, fX = A,
     fy = fit$y, optimizeP = fit$optimizeP, useLambda = fit$useLambda)
    where 9: control$modelL0[[j]](xt, as.matrix(yt), control$modelL0Control[[j]])
    where 10: buildEnsembleStack(x, y)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x, AX, Ay, optimizeP = FALSE, useLambda = TRUE)
    {
     nx <- nrow(AX)
     theta <- 10^x[1:nx]
     if (optimizeP) {
     AX <- abs(AX)^(x[(nx + 1):(2 * nx)])
     }
     lambda <- 0
     if (useLambda)
     lambda <- 10^x[length(x)]
     if (any(theta == 0) || any(is.infinite(c(theta, lambda)))) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, ssq = NA))
     }
     n <- dim(Ay)[1]
     Psi <- exp(-matrix(colSums(theta * AX), n, n))
     if (useLambda)
     Psi <- Psi + diag(lambda, n)
     if (any(is.infinite(Psi))) {
     penalty <- 10000
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     kap <- rcond(Psi)
     if (is.na(kap))
     kap <- 0
     if (kap < 1e-10) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA, a = NA, U = NA, isIndefinite = TRUE))
     }
     cholPsi <- try(chol(Psi), TRUE)
     if (class(cholPsi) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     LnDetPsi <- 2 * sum(log(abs(diag(cholPsi))))
     Psinv <- try(chol2inv(cholPsi), TRUE)
     if (class(Psinv) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     psisum <- sum(Psinv)
     if (psisum == 0) {
     psisum <- as.numeric(rep(1, n) %*% Psinv %*% rep(1, n))
     if (psisum == 0) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     }
     mu <- sum(Psinv %*% Ay)/psisum
     if (is.infinite(mu) | is.na(mu)) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     yonemu <- Ay - mu
     SigmaSqr <- (t(yonemu) %*% Psinv %*% yonemu)/n
     if (SigmaSqr < 0) {
     return(list(NegLnLike = 10000 - SigmaSqr, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     NegLnLike <- n * log(SigmaSqr) + LnDetPsi
     if (is.na(NegLnLike) | is.infinite(NegLnLike))
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     list(NegLnLike = NegLnLike, Psi = Psi, Psinv = Psinv, mu = mu,
     yonemu = yonemu, ssq = SigmaSqr)
    }
    <bytecode: 0xc2c70e0>
    <environment: namespace:SPOT>
     --- function search by body ---
    Function krigingLikelihood in namespace SPOT has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-clang

Version: 2.0.4
Check: tests
Result: ERROR
     Running 'testthat.R' [7s/9s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(SPOT)
     >
     > test_check("SPOT")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     SPOT
     --- call from context ---
     krigingLikelihood(x, fX, fy, optimizeP, useLambda)
     --- call from argument ---
     if (class(cholPsi) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA, mu = NA,
     SSQ = NA))
     }
     --- R stacktrace ---
     where 1: krigingLikelihood(x, fX, fy, optimizeP, useLambda)
     where 2: FUN(newX[, i], ...)
     where 3: apply(x, 1, fitFun, fX, fy, optimizeP, useLambda)
     where 4: fun(matrix(x, 1), ...)
     where 5: fn(par, ...)
     where 6: (function (par)
     fn(par, ...))(c(0.05, 0.05, 0))
     where 7: optim(par = x, fn = fn, lower = lower, upper = upper, control = control,
     method = "L-BFGS-B", ...)
     where 8: fit$algTheta(x = x0, fun = function(x, fX, fy, optimizeP, useLambda) {
     if (!is.matrix(x)) {
     fitFun(x, fX, fy, optimizeP, useLambda)
     }
     else {
     apply(x, 1, fitFun, fX, fy, optimizeP, useLambda)
     }
     }, lower = LowerTheta, upper = UpperTheta, control = opts, fX = A,
     fy = fit$y, optimizeP = fit$optimizeP, useLambda = fit$useLambda)
     where 9: control$model(x = x, y = y, control = control$modelControl)
     where 10: spotLoop(x = x, y = y, fun = fun, lower = lower, upper = upper,
     control = control, ...)
     where 11 at testthat/test.inequalityConstraint.R#32: spot(, fun = funSphere, lower = c(-10, -20), upper = c(20, 8),
     control = list(funEvals = 15, modelControl = list(target = "ei"),
     optimizer = optimNLOPTR, optimizerControl = contr))
     where 12: eval(code, test_env)
     where 13: eval(code, test_env)
     where 14: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 15: doTryCatch(return(expr), name, parentenv, handler)
     where 16: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 17: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 18: doTryCatch(return(expr), name, parentenv, handler)
     where 19: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 20: tryCatchList(expr, classes, parentenv, handlers)
     where 21: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 22: test_code(desc, code, env = parent.frame())
     where 23 at testthat/test.inequalityConstraint.R#26: test_that("check SPOT+NLOPTR with inequality constraints but with default design",
     {
     contr <- list()
     contr$eval_g_ineq <- function(x) 1 + x[1] - x[2]
     contr$funEvals <- 100
     contr$opts$algorithm <- "NLOPT_GN_ISRES"
     res <- spot(, fun = funSphere, lower = c(-10, -20), upper = c(20,
     8), control = list(funEvals = 15, modelControl = list(target = "ei"),
     optimizer = optimNLOPTR, optimizerControl = contr))
     res$xbest
     res$ybest
     expect_true(!all(apply(res$x, 1, contr$eval_g_ineq) <=
     0))
     })
     where 24: eval(code, test_env)
     where 25: eval(code, test_env)
     where 26: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 27: doTryCatch(return(expr), name, parentenv, handler)
     where 28: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 29: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 30: doTryCatch(return(expr), name, parentenv, handler)
     where 31: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 32: tryCatchList(expr, classes, parentenv, handlers)
     where 33: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 34: test_code(NULL, exprs, env)
     where 35: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 41: FUN(X[[i]], ...)
     where 42: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 43: force(code)
     where 44: doWithOneRestart(return(expr), restart)
     where 45: withOneRestart(expr, restarts[[1L]])
     where 46: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 47: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 48: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 49: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 50: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 51: test_check("SPOT")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (x, AX, Ay, optimizeP = FALSE, useLambda = TRUE)
     {
     nx <- nrow(AX)
     theta <- 10^x[1:nx]
     if (optimizeP) {
     AX <- abs(AX)^(x[(nx + 1):(2 * nx)])
     }
     lambda <- 0
     if (useLambda)
     lambda <- 10^x[length(x)]
     if (any(theta == 0) || any(is.infinite(c(theta, lambda)))) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, ssq = NA))
     }
     n <- dim(Ay)[1]
     Psi <- exp(-matrix(colSums(theta * AX), n, n))
     if (useLambda)
     Psi <- Psi + diag(lambda, n)
     if (any(is.infinite(Psi))) {
     penalty <- 10000
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     kap <- rcond(Psi)
     if (is.na(kap))
     kap <- 0
     if (kap < 1e-10) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA, a = NA, U = NA, isIndefinite = TRUE))
     }
     cholPsi <- try(chol(Psi), TRUE)
     if (class(cholPsi) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     LnDetPsi <- 2 * sum(log(abs(diag(cholPsi))))
     Psinv <- try(chol2inv(cholPsi), TRUE)
     if (class(Psinv) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     psisum <- sum(Psinv)
     if (psisum == 0) {
     psisum <- as.numeric(rep(1, n) %*% Psinv %*% rep(1, n))
     if (psisum == 0) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     }
     mu <- sum(Psinv %*% Ay)/psisum
     if (is.infinite(mu) | is.na(mu)) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     yonemu <- Ay - mu
     SigmaSqr <- (t(yonemu) %*% Psinv %*% yonemu)/n
     if (SigmaSqr < 0) {
     return(list(NegLnLike = 10000 - SigmaSqr, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     NegLnLike <- n * log(SigmaSqr) + LnDetPsi
     if (is.na(NegLnLike) | is.infinite(NegLnLike))
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     list(NegLnLike = NegLnLike, Psi = Psi, Psinv = Psinv, mu = mu,
     yonemu = yonemu, ssq = SigmaSqr)
     }
     <bytecode: 0xc65fab8>
     <environment: namespace:SPOT>
     --- function search by body ---
     Function krigingLikelihood in namespace SPOT has this body.
     ----------- END OF FAILURE REPORT --------------
     Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-clang

Version: 2.0.4
Check: examples
Result: ERROR
    Running examples in ‘SPOT-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: buildEnsembleStack
    > ### Title: Ensemble: Stacking
    > ### Aliases: buildEnsembleStack
    >
    > ### ** Examples
    >
    > ## Create a test function: branin
    > braninFunction <- function (x) {
    + (x[2] - 5.1/(4 * pi^2) * (x[1] ^2) + 5/pi * x[1] - 6)^2 +
    + 10 * (1 - 1/(8 * pi)) * cos(x[1] ) + 10
    + }
    > ## Create design points
    > x <- cbind(runif(20)*15-5,runif(20)*15)
    > ## Compute observations at design points
    > y <- as.matrix(apply(x,1,braninFunction))
    > ## Create model with default settings
    > fit <- buildEnsembleStack(x,y)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SPOT
     --- call from context ---
    krigingLikelihood(x, fX, fy, optimizeP, useLambda)
     --- call from argument ---
    if (class(cholPsi) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA, mu = NA,
     SSQ = NA))
    }
     --- R stacktrace ---
    where 1: krigingLikelihood(x, fX, fy, optimizeP, useLambda)
    where 2: FUN(newX[, i], ...)
    where 3: apply(x, 1, fitFun, fX, fy, optimizeP, useLambda)
    where 4: fun(matrix(x, 1), ...)
    where 5: fn(par, ...)
    where 6: (function (par)
    fn(par, ...))(c(0.09, 0.09, 0))
    where 7: optim(par = x, fn = fn, lower = lower, upper = upper, control = control,
     method = "L-BFGS-B", ...)
    where 8: fit$algTheta(x = x0, fun = function(x, fX, fy, optimizeP, useLambda) {
     if (!is.matrix(x)) {
     fitFun(x, fX, fy, optimizeP, useLambda)
     }
     else {
     apply(x, 1, fitFun, fX, fy, optimizeP, useLambda)
     }
    }, lower = LowerTheta, upper = UpperTheta, control = opts, fX = A,
     fy = fit$y, optimizeP = fit$optimizeP, useLambda = fit$useLambda)
    where 9: control$modelL0[[j]](xt, as.matrix(yt), control$modelL0Control[[j]])
    where 10: buildEnsembleStack(x, y)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x, AX, Ay, optimizeP = FALSE, useLambda = TRUE)
    {
     nx <- nrow(AX)
     theta <- 10^x[1:nx]
     if (optimizeP) {
     AX <- abs(AX)^(x[(nx + 1):(2 * nx)])
     }
     lambda <- 0
     if (useLambda)
     lambda <- 10^x[length(x)]
     if (any(theta == 0) || any(is.infinite(c(theta, lambda)))) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, ssq = NA))
     }
     n <- dim(Ay)[1]
     Psi <- exp(-matrix(colSums(theta * AX), n, n))
     if (useLambda)
     Psi <- Psi + diag(lambda, n)
     if (any(is.infinite(Psi))) {
     penalty <- 10000
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     kap <- rcond(Psi)
     if (is.na(kap))
     kap <- 0
     if (kap < 1e-10) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA, a = NA, U = NA, isIndefinite = TRUE))
     }
     cholPsi <- try(chol(Psi), TRUE)
     if (class(cholPsi) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     LnDetPsi <- 2 * sum(log(abs(diag(cholPsi))))
     Psinv <- try(chol2inv(cholPsi), TRUE)
     if (class(Psinv) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     psisum <- sum(Psinv)
     if (psisum == 0) {
     psisum <- as.numeric(rep(1, n) %*% Psinv %*% rep(1, n))
     if (psisum == 0) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     }
     mu <- sum(Psinv %*% Ay)/psisum
     if (is.infinite(mu) | is.na(mu)) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     yonemu <- Ay - mu
     SigmaSqr <- (t(yonemu) %*% Psinv %*% yonemu)/n
     if (SigmaSqr < 0) {
     return(list(NegLnLike = 10000 - SigmaSqr, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     NegLnLike <- n * log(SigmaSqr) + LnDetPsi
     if (is.na(NegLnLike) | is.infinite(NegLnLike))
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     list(NegLnLike = NegLnLike, Psi = Psi, Psinv = Psinv, mu = mu,
     yonemu = yonemu, ssq = SigmaSqr)
    }
    <bytecode: 0x557ec5293938>
    <environment: namespace:SPOT>
     --- function search by body ---
    Function krigingLikelihood in namespace SPOT has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 2.0.4
Check: tests
Result: ERROR
     Running ‘testthat.R’ [5s/9s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(SPOT)
     >
     > test_check("SPOT")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     SPOT
     --- call from context ---
     krigingLikelihood(x, fX, fy, optimizeP, useLambda)
     --- call from argument ---
     if (class(cholPsi) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA, mu = NA,
     SSQ = NA))
     }
     --- R stacktrace ---
     where 1: krigingLikelihood(x, fX, fy, optimizeP, useLambda)
     where 2: FUN(newX[, i], ...)
     where 3: apply(x, 1, fitFun, fX, fy, optimizeP, useLambda)
     where 4: fun(matrix(x, 1), ...)
     where 5: fn(par, ...)
     where 6: (function (par)
     fn(par, ...))(c(0.05, 0.05, 0))
     where 7: optim(par = x, fn = fn, lower = lower, upper = upper, control = control,
     method = "L-BFGS-B", ...)
     where 8: fit$algTheta(x = x0, fun = function(x, fX, fy, optimizeP, useLambda) {
     if (!is.matrix(x)) {
     fitFun(x, fX, fy, optimizeP, useLambda)
     }
     else {
     apply(x, 1, fitFun, fX, fy, optimizeP, useLambda)
     }
     }, lower = LowerTheta, upper = UpperTheta, control = opts, fX = A,
     fy = fit$y, optimizeP = fit$optimizeP, useLambda = fit$useLambda)
     where 9: control$model(x = x, y = y, control = control$modelControl)
     where 10: spotLoop(x = x, y = y, fun = fun, lower = lower, upper = upper,
     control = control, ...)
     where 11 at testthat/test.inequalityConstraint.R#32: spot(, fun = funSphere, lower = c(-10, -20), upper = c(20, 8),
     control = list(funEvals = 15, modelControl = list(target = "ei"),
     optimizer = optimNLOPTR, optimizerControl = contr))
     where 12: eval(code, test_env)
     where 13: eval(code, test_env)
     where 14: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 15: doTryCatch(return(expr), name, parentenv, handler)
     where 16: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 17: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 18: doTryCatch(return(expr), name, parentenv, handler)
     where 19: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 20: tryCatchList(expr, classes, parentenv, handlers)
     where 21: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 22: test_code(desc, code, env = parent.frame())
     where 23 at testthat/test.inequalityConstraint.R#26: test_that("check SPOT+NLOPTR with inequality constraints but with default design",
     {
     contr <- list()
     contr$eval_g_ineq <- function(x) 1 + x[1] - x[2]
     contr$funEvals <- 100
     contr$opts$algorithm <- "NLOPT_GN_ISRES"
     res <- spot(, fun = funSphere, lower = c(-10, -20), upper = c(20,
     8), control = list(funEvals = 15, modelControl = list(target = "ei"),
     optimizer = optimNLOPTR, optimizerControl = contr))
     res$xbest
     res$ybest
     expect_true(!all(apply(res$x, 1, contr$eval_g_ineq) <=
     0))
     })
     where 24: eval(code, test_env)
     where 25: eval(code, test_env)
     where 26: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 27: doTryCatch(return(expr), name, parentenv, handler)
     where 28: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 29: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 30: doTryCatch(return(expr), name, parentenv, handler)
     where 31: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 32: tryCatchList(expr, classes, parentenv, handlers)
     where 33: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 34: test_code(NULL, exprs, env)
     where 35: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 41: FUN(X[[i]], ...)
     where 42: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 43: force(code)
     where 44: doWithOneRestart(return(expr), restart)
     where 45: withOneRestart(expr, restarts[[1L]])
     where 46: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 47: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 48: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 49: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 50: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 51: test_check("SPOT")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (x, AX, Ay, optimizeP = FALSE, useLambda = TRUE)
     {
     nx <- nrow(AX)
     theta <- 10^x[1:nx]
     if (optimizeP) {
     AX <- abs(AX)^(x[(nx + 1):(2 * nx)])
     }
     lambda <- 0
     if (useLambda)
     lambda <- 10^x[length(x)]
     if (any(theta == 0) || any(is.infinite(c(theta, lambda)))) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, ssq = NA))
     }
     n <- dim(Ay)[1]
     Psi <- exp(-matrix(colSums(theta * AX), n, n))
     if (useLambda)
     Psi <- Psi + diag(lambda, n)
     if (any(is.infinite(Psi))) {
     penalty <- 10000
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     kap <- rcond(Psi)
     if (is.na(kap))
     kap <- 0
     if (kap < 1e-10) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA, a = NA, U = NA, isIndefinite = TRUE))
     }
     cholPsi <- try(chol(Psi), TRUE)
     if (class(cholPsi) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     LnDetPsi <- 2 * sum(log(abs(diag(cholPsi))))
     Psinv <- try(chol2inv(cholPsi), TRUE)
     if (class(Psinv) == "try-error") {
     penalty <- 10000 - min(eigen(Psi, symmetric = TRUE, only.values = TRUE)$values)
     return(list(NegLnLike = penalty, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     psisum <- sum(Psinv)
     if (psisum == 0) {
     psisum <- as.numeric(rep(1, n) %*% Psinv %*% rep(1, n))
     if (psisum == 0) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     }
     mu <- sum(Psinv %*% Ay)/psisum
     if (is.infinite(mu) | is.na(mu)) {
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     yonemu <- Ay - mu
     SigmaSqr <- (t(yonemu) %*% Psinv %*% yonemu)/n
     if (SigmaSqr < 0) {
     return(list(NegLnLike = 10000 - SigmaSqr, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     }
     NegLnLike <- n * log(SigmaSqr) + LnDetPsi
     if (is.na(NegLnLike) | is.infinite(NegLnLike))
     return(list(NegLnLike = 10000, Psi = NA, Psinv = NA,
     mu = NA, SSQ = NA))
     list(NegLnLike = NegLnLike, Psi = Psi, Psinv = Psinv, mu = mu,
     yonemu = yonemu, ssq = SigmaSqr)
     }
     <bytecode: 0x55e0c520a350>
     <environment: namespace:SPOT>
     --- function search by body ---
     Function krigingLikelihood in namespace SPOT has this body.
     ----------- END OF FAILURE REPORT --------------
     Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-gcc