CRAN Package Check Results for Package SpatioTemporal

Last updated on 2020-03-07 11:48:30 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.9.1 19.85 225.61 245.46 ERROR
r-devel-linux-x86_64-debian-gcc 1.1.9.1 13.05 173.42 186.47 ERROR
r-devel-linux-x86_64-fedora-clang 1.1.9.1 299.89 ERROR
r-devel-linux-x86_64-fedora-gcc 1.1.9.1 293.97 ERROR
r-devel-windows-ix86+x86_64 1.1.9.1 54.00 186.00 240.00 OK --no-vignettes
r-devel-windows-ix86+x86_64-gcc8 1.1.9.1 30.00 188.00 218.00 OK --no-vignettes
r-patched-linux-x86_64 1.1.9.1 14.44 250.84 265.28 OK
r-patched-solaris-x86 1.1.9.1 644.40 OK
r-release-linux-x86_64 1.1.9.1 15.65 253.45 269.10 OK
r-release-windows-ix86+x86_64 1.1.9.1 30.00 169.00 199.00 OK --no-vignettes
r-release-osx-x86_64 1.1.9.1 OK
r-oldrel-windows-ix86+x86_64 1.1.9.1 24.00 174.00 198.00 OK --no-vignettes
r-oldrel-osx-x86_64 1.1.9.1 OK

Additional issues

LTO

Check Details

Version: 1.1.9.1
Check: examples
Result: ERROR
    Running examples in 'SpatioTemporal-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: loglikeST
    > ### Title: Compute the Log-likelihood for the Spatio-Temporal Model
    > ### Aliases: loglikeST loglikeSTnaive
    >
    > ### ** Examples
    >
    > ##load the data
    > data(mesa.model)
    >
    > ##Compute dimensions for the data structure
    > dim <- loglikeSTdim(mesa.model)
    >
    > ##Find out in which order parameters should be given
    > loglikeST(NULL, mesa.model)
     [1] "log.range.const.exp" "log.sill.const.exp"
     [3] "log.range.V1.exp" "log.sill.V1.exp"
     [5] "log.range.V2.exp" "log.sill.V2.exp"
     [7] "nu.log.range.exp" "nu.log.sill.exp"
     [9] "nu.log.nugget.(Intercept).exp" "nu.log.nugget.typeFIXED.exp"
    >
    > ##Let's create random vectors of values
    > x <- runif( dim$nparam.cov )
    > x.all <- runif( dim$nparam )
    >
    > ##Evaluate the log-likelihood for these values
    > loglikeST(x.all, mesa.model, "f")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpatioTemporal
     --- call from context ---
    loglikeST(x.all, mesa.model, "f")
     --- call from argument ---
    if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
    }
     --- R stacktrace ---
    where 1: loglikeST(x.all, mesa.model, "f")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x = NULL, STmodel, type = "p", x.fixed = NULL)
    {
     stCheckClass(STmodel, "STmodel", name = "STmodel")
     type <- tolower(type)
     x <- stCheckLoglikeIn(x, x.fixed, type)
     if (is.null(x) || any(is.na(x))) {
     return(loglikeSTnames(STmodel, all = (type == "f")))
     }
     dimensions <- loglikeSTdim(STmodel)
     if ((type == "f" && length(x) != dimensions$nparam) || (type !=
     "f" && length(x) != dimensions$nparam.cov)) {
     stop("Number of parameters, length(x), incorrect.")
     }
     tmp <- loglikeSTgetPars(x, STmodel)
     if (type == "f") {
     gamma <- tmp$gamma
     alpha <- tmp$alpha
     }
     cov.pars.beta <- tmp$cov.beta
     cov.pars.nu <- tmp$cov.nu
     Y <- STmodel$obs$obs
     F <- expandF(STmodel$F, STmodel$obs$idx, n.loc = dimensions$n.obs)
     if (type == "f") {
     mu.B <- matrix(calc.mu.B(STmodel$LUR, alpha), ncol = 1)
     if (dimensions$L != 0) {
     Y <- Y - STmodel$ST %*% gamma
     }
     }
     sigma.B <- makeSigmaB(cov.pars.beta$pars, dist = STmodel$D.beta,
     type = STmodel$cov.beta$covf, nugget = cov.pars.beta$nugget)
     sigma.nu <- makeSigmaNu(cov.pars.nu$pars, dist = STmodel$D.nu,
     type = STmodel$cov.nu$covf, nugget = cov.pars.nu$nugget,
     random.effect = cov.pars.nu$random.effect, blocks1 = STmodel$nt,
     ind1 = STmodel$obs$idx, sparse = TRUE)
     sigma.B <- try(makeCholBlock(sigma.B, n.blocks = dimensions$m),
     silent = TRUE)
     if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
     }
     sigma.nu <- try(chol(sigma.nu), silent = TRUE)
     if (class(sigma.nu) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- -sumLogDiag(sigma.B)
     l <- l - sumLog(diag(sigma.nu))
     sigma.B <- invCholBlock(sigma.B, n.blocks = dimensions$m)
     sigma.nu <- chol2inv(sigma.nu)
     i.sR.Y <- as.matrix(sigma.nu %*% Y)
     if (type == "f") {
     i.sB.mu.B <- blockMult(sigma.B, mu.B, n.blocks = dimensions$m)
     l <- l - dotProd(i.sB.mu.B, mu.B)/2
     l <- l - dotProd(i.sR.Y, Y)/2
     }
     else {
     iS.X <- calc.iS.X(STmodel$LUR, sigma.B)
     if (dimensions$L != 0) {
     i.sR.M <- as.matrix(sigma.nu %*% STmodel$ST)
     }
     F.i.sR.Y <- calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     if (dimensions$L != 0) {
     F.i.sR.M <- calc.tFX(STmodel$F, i.sR.M, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     }
     }
     sigma.B.Y <- as.matrix(t(F) %*% sigma.nu %*% F) + sigma.B
     sigma.B.Y <- try(chol(sigma.B.Y), silent = TRUE)
     if (class(sigma.B.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- l - sumLogDiag(sigma.B.Y)
     if (type == "f") {
     mu.B.Y <- i.sB.mu.B + calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     mu.B.Y <- solveTriBlock(sigma.B.Y, mu.B.Y, transpose = TRUE)
     l <- l + norm2(mu.B.Y)/2
     }
     else {
     Y.hat <- solveTriBlock(sigma.B.Y, F.i.sR.Y, transpose = TRUE)
     if (dimensions$L != 0) {
     M.hat <- solveTriBlock(sigma.B.Y, F.i.sR.M, transpose = TRUE)
     }
     sigma.B.Y <- invCholBlock(sigma.B.Y)
     sigma.B.Y.iS.X <- sigma.B.Y %*% iS.X
     i.sigma.alpha.Y <- -t(iS.X) %*% sigma.B.Y.iS.X + calc.X.iS.X(STmodel$LUR,
     iS.X)
     i.sigma.alpha.Y <- try(chol(i.sigma.alpha.Y), silent = TRUE)
     if (class(i.sigma.alpha.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(i.sigma.alpha.Y)
     }
     Y.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.Y
     Y.hat.2 <- solveTriBlock(i.sigma.alpha.Y, Y.hat.2, transpose = TRUE)
     Y.sigma.hat.Y <- dotProd(Y, i.sR.Y) - norm2(Y.hat) -
     norm2(Y.hat.2)
     l <- l - Y.sigma.hat.Y/2
     if (dimensions$L != 0) {
     M.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.M
     M.hat.2 <- solveTriBlock(i.sigma.alpha.Y, M.hat.2,
     transpose = TRUE)
     Y.sigma.hat.M <- (t(Y) %*% i.sR.M - t(Y.hat) %*%
     M.hat - t(Y.hat.2) %*% M.hat.2)
     Y.sigma.hat.M <- t(Y.sigma.hat.M)
     M.sigma.hat.M <- (t(STmodel$ST) %*% i.sR.M - t(M.hat) %*%
     M.hat - t(M.hat.2) %*% M.hat.2)
     M.sigma.hat.M <- try(chol(M.sigma.hat.M), silent = TRUE)
     if (class(M.sigma.hat.M) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(M.sigma.hat.M)
     }
     Y.sigma.hat.M <- solveTriBlock(M.sigma.hat.M, Y.sigma.hat.M,
     transpose = TRUE)
     l <- l + norm2(Y.sigma.hat.M)/2
     }
     }
     l <- as.double(l)
     if (!is.finite(l))
     l <- -.Machine$double.xmax
     return(l)
    }
    <bytecode: 0x239e118>
    <environment: namespace:SpatioTemporal>
     --- function search by body ---
    Function loglikeST in namespace SpatioTemporal has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(sigma.B) == "try-error") { :
     the condition has length > 1
    Calls: loglikeST
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.1.9.1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'ST_intro.Rnw' using Sweave
    Loading required package: Matrix
    Replacing existing trend.
    Replacing existing trend.
    Replacing existing trend.
    --- finished re-building 'ST_intro.Rnw'
    
    --- re-building 'ST_tutorial.Rnw' using Sweave
    Loading required package: Matrix
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpatioTemporal
     --- call from context ---
    loglikeST(est.mesa.model$res.best$par, mesa.model)
     --- call from argument ---
    if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
    }
     --- R stacktrace ---
    where 1: loglikeST(est.mesa.model$res.best$par, mesa.model)
    where 2: eval(expr, .GlobalEnv)
    where 3: eval(expr, .GlobalEnv)
    where 4: withVisible(eval(expr, .GlobalEnv))
    where 5: doTryCatch(return(expr), name, parentenv, handler)
    where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 7: tryCatchList(expr, classes, parentenv, handlers)
    where 8: 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 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 10: evalFunc(ce, options)
    where 11: tryCatchList(expr, classes, parentenv, handlers)
    where 12: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 13: driver$runcode(drobj, chunk, chunkopts)
    where 14: utils::Sweave(...)
    where 15: engine$weave(file, quiet = quiet, encoding = enc)
    where 16: doTryCatch(return(expr), name, parentenv, handler)
    where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 18: tryCatchList(expr, classes, parentenv, handlers)
    where 19: 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)
     }
    }, error = function(e) {
     OK <<- FALSE
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 20: tools:::.buildOneVignette("ST_tutorial.Rnw", "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/SpatioTemporal.Rcheck/vign_test/SpatioTemporal",
     TRUE, FALSE, "ST_tutorial", "", "/tmp/RtmpQucNNk/file27926f9746e.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x = NULL, STmodel, type = "p", x.fixed = NULL)
    {
     stCheckClass(STmodel, "STmodel", name = "STmodel")
     type <- tolower(type)
     x <- stCheckLoglikeIn(x, x.fixed, type)
     if (is.null(x) || any(is.na(x))) {
     return(loglikeSTnames(STmodel, all = (type == "f")))
     }
     dimensions <- loglikeSTdim(STmodel)
     if ((type == "f" && length(x) != dimensions$nparam) || (type !=
     "f" && length(x) != dimensions$nparam.cov)) {
     stop("Number of parameters, length(x), incorrect.")
     }
     tmp <- loglikeSTgetPars(x, STmodel)
     if (type == "f") {
     gamma <- tmp$gamma
     alpha <- tmp$alpha
     }
     cov.pars.beta <- tmp$cov.beta
     cov.pars.nu <- tmp$cov.nu
     Y <- STmodel$obs$obs
     F <- expandF(STmodel$F, STmodel$obs$idx, n.loc = dimensions$n.obs)
     if (type == "f") {
     mu.B <- matrix(calc.mu.B(STmodel$LUR, alpha), ncol = 1)
     if (dimensions$L != 0) {
     Y <- Y - STmodel$ST %*% gamma
     }
     }
     sigma.B <- makeSigmaB(cov.pars.beta$pars, dist = STmodel$D.beta,
     type = STmodel$cov.beta$covf, nugget = cov.pars.beta$nugget)
     sigma.nu <- makeSigmaNu(cov.pars.nu$pars, dist = STmodel$D.nu,
     type = STmodel$cov.nu$covf, nugget = cov.pars.nu$nugget,
     random.effect = cov.pars.nu$random.effect, blocks1 = STmodel$nt,
     ind1 = STmodel$obs$idx, sparse = TRUE)
     sigma.B <- try(makeCholBlock(sigma.B, n.blocks = dimensions$m),
     silent = TRUE)
     if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
     }
     sigma.nu <- try(chol(sigma.nu), silent = TRUE)
     if (class(sigma.nu) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- -sumLogDiag(sigma.B)
     l <- l - sumLog(diag(sigma.nu))
     sigma.B <- invCholBlock(sigma.B, n.blocks = dimensions$m)
     sigma.nu <- chol2inv(sigma.nu)
     i.sR.Y <- as.matrix(sigma.nu %*% Y)
     if (type == "f") {
     i.sB.mu.B <- blockMult(sigma.B, mu.B, n.blocks = dimensions$m)
     l <- l - dotProd(i.sB.mu.B, mu.B)/2
     l <- l - dotProd(i.sR.Y, Y)/2
     }
     else {
     iS.X <- calc.iS.X(STmodel$LUR, sigma.B)
     if (dimensions$L != 0) {
     i.sR.M <- as.matrix(sigma.nu %*% STmodel$ST)
     }
     F.i.sR.Y <- calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     if (dimensions$L != 0) {
     F.i.sR.M <- calc.tFX(STmodel$F, i.sR.M, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     }
     }
     sigma.B.Y <- as.matrix(t(F) %*% sigma.nu %*% F) + sigma.B
     sigma.B.Y <- try(chol(sigma.B.Y), silent = TRUE)
     if (class(sigma.B.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- l - sumLogDiag(sigma.B.Y)
     if (type == "f") {
     mu.B.Y <- i.sB.mu.B + calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     mu.B.Y <- solveTriBlock(sigma.B.Y, mu.B.Y, transpose = TRUE)
     l <- l + norm2(mu.B.Y)/2
     }
     else {
     Y.hat <- solveTriBlock(sigma.B.Y, F.i.sR.Y, transpose = TRUE)
     if (dimensions$L != 0) {
     M.hat <- solveTriBlock(sigma.B.Y, F.i.sR.M, transpose = TRUE)
     }
     sigma.B.Y <- invCholBlock(sigma.B.Y)
     sigma.B.Y.iS.X <- sigma.B.Y %*% iS.X
     i.sigma.alpha.Y <- -t(iS.X) %*% sigma.B.Y.iS.X + calc.X.iS.X(STmodel$LUR,
     iS.X)
     i.sigma.alpha.Y <- try(chol(i.sigma.alpha.Y), silent = TRUE)
     if (class(i.sigma.alpha.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(i.sigma.alpha.Y)
     }
     Y.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.Y
     Y.hat.2 <- solveTriBlock(i.sigma.alpha.Y, Y.hat.2, transpose = TRUE)
     Y.sigma.hat.Y <- dotProd(Y, i.sR.Y) - norm2(Y.hat) -
     norm2(Y.hat.2)
     l <- l - Y.sigma.hat.Y/2
     if (dimensions$L != 0) {
     M.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.M
     M.hat.2 <- solveTriBlock(i.sigma.alpha.Y, M.hat.2,
     transpose = TRUE)
     Y.sigma.hat.M <- (t(Y) %*% i.sR.M - t(Y.hat) %*%
     M.hat - t(Y.hat.2) %*% M.hat.2)
     Y.sigma.hat.M <- t(Y.sigma.hat.M)
     M.sigma.hat.M <- (t(STmodel$ST) %*% i.sR.M - t(M.hat) %*%
     M.hat - t(M.hat.2) %*% M.hat.2)
     M.sigma.hat.M <- try(chol(M.sigma.hat.M), silent = TRUE)
     if (class(M.sigma.hat.M) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(M.sigma.hat.M)
     }
     Y.sigma.hat.M <- solveTriBlock(M.sigma.hat.M, Y.sigma.hat.M,
     transpose = TRUE)
     l <- l + norm2(Y.sigma.hat.M)/2
     }
     }
     l <- as.double(l)
     if (!is.finite(l))
     l <- -.Machine$double.xmax
     return(l)
    }
    <bytecode: 0x7a74cb8>
    <environment: namespace:SpatioTemporal>
     --- function search by body ---
    Function loglikeST in namespace SpatioTemporal has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'ST_tutorial.Rnw' failed with diagnostics:
     chunk 34
    Error in if (class(sigma.B) == "try-error") { :
     the condition has length > 1
    
    --- failed re-building 'ST_tutorial.Rnw'
    
    SUMMARY: processing the following file failed:
     'ST_tutorial.Rnw'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.1.9.1
Check: examples
Result: ERROR
    Running examples in ‘SpatioTemporal-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: loglikeST
    > ### Title: Compute the Log-likelihood for the Spatio-Temporal Model
    > ### Aliases: loglikeST loglikeSTnaive
    >
    > ### ** Examples
    >
    > ##load the data
    > data(mesa.model)
    >
    > ##Compute dimensions for the data structure
    > dim <- loglikeSTdim(mesa.model)
    >
    > ##Find out in which order parameters should be given
    > loglikeST(NULL, mesa.model)
     [1] "log.range.const.exp" "log.sill.const.exp"
     [3] "log.range.V1.exp" "log.sill.V1.exp"
     [5] "log.range.V2.exp" "log.sill.V2.exp"
     [7] "nu.log.range.exp" "nu.log.sill.exp"
     [9] "nu.log.nugget.(Intercept).exp" "nu.log.nugget.typeFIXED.exp"
    >
    > ##Let's create random vectors of values
    > x <- runif( dim$nparam.cov )
    > x.all <- runif( dim$nparam )
    >
    > ##Evaluate the log-likelihood for these values
    > loglikeST(x.all, mesa.model, "f")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpatioTemporal
     --- call from context ---
    loglikeST(x.all, mesa.model, "f")
     --- call from argument ---
    if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
    }
     --- R stacktrace ---
    where 1: loglikeST(x.all, mesa.model, "f")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x = NULL, STmodel, type = "p", x.fixed = NULL)
    {
     stCheckClass(STmodel, "STmodel", name = "STmodel")
     type <- tolower(type)
     x <- stCheckLoglikeIn(x, x.fixed, type)
     if (is.null(x) || any(is.na(x))) {
     return(loglikeSTnames(STmodel, all = (type == "f")))
     }
     dimensions <- loglikeSTdim(STmodel)
     if ((type == "f" && length(x) != dimensions$nparam) || (type !=
     "f" && length(x) != dimensions$nparam.cov)) {
     stop("Number of parameters, length(x), incorrect.")
     }
     tmp <- loglikeSTgetPars(x, STmodel)
     if (type == "f") {
     gamma <- tmp$gamma
     alpha <- tmp$alpha
     }
     cov.pars.beta <- tmp$cov.beta
     cov.pars.nu <- tmp$cov.nu
     Y <- STmodel$obs$obs
     F <- expandF(STmodel$F, STmodel$obs$idx, n.loc = dimensions$n.obs)
     if (type == "f") {
     mu.B <- matrix(calc.mu.B(STmodel$LUR, alpha), ncol = 1)
     if (dimensions$L != 0) {
     Y <- Y - STmodel$ST %*% gamma
     }
     }
     sigma.B <- makeSigmaB(cov.pars.beta$pars, dist = STmodel$D.beta,
     type = STmodel$cov.beta$covf, nugget = cov.pars.beta$nugget)
     sigma.nu <- makeSigmaNu(cov.pars.nu$pars, dist = STmodel$D.nu,
     type = STmodel$cov.nu$covf, nugget = cov.pars.nu$nugget,
     random.effect = cov.pars.nu$random.effect, blocks1 = STmodel$nt,
     ind1 = STmodel$obs$idx, sparse = TRUE)
     sigma.B <- try(makeCholBlock(sigma.B, n.blocks = dimensions$m),
     silent = TRUE)
     if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
     }
     sigma.nu <- try(chol(sigma.nu), silent = TRUE)
     if (class(sigma.nu) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- -sumLogDiag(sigma.B)
     l <- l - sumLog(diag(sigma.nu))
     sigma.B <- invCholBlock(sigma.B, n.blocks = dimensions$m)
     sigma.nu <- chol2inv(sigma.nu)
     i.sR.Y <- as.matrix(sigma.nu %*% Y)
     if (type == "f") {
     i.sB.mu.B <- blockMult(sigma.B, mu.B, n.blocks = dimensions$m)
     l <- l - dotProd(i.sB.mu.B, mu.B)/2
     l <- l - dotProd(i.sR.Y, Y)/2
     }
     else {
     iS.X <- calc.iS.X(STmodel$LUR, sigma.B)
     if (dimensions$L != 0) {
     i.sR.M <- as.matrix(sigma.nu %*% STmodel$ST)
     }
     F.i.sR.Y <- calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     if (dimensions$L != 0) {
     F.i.sR.M <- calc.tFX(STmodel$F, i.sR.M, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     }
     }
     sigma.B.Y <- as.matrix(t(F) %*% sigma.nu %*% F) + sigma.B
     sigma.B.Y <- try(chol(sigma.B.Y), silent = TRUE)
     if (class(sigma.B.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- l - sumLogDiag(sigma.B.Y)
     if (type == "f") {
     mu.B.Y <- i.sB.mu.B + calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     mu.B.Y <- solveTriBlock(sigma.B.Y, mu.B.Y, transpose = TRUE)
     l <- l + norm2(mu.B.Y)/2
     }
     else {
     Y.hat <- solveTriBlock(sigma.B.Y, F.i.sR.Y, transpose = TRUE)
     if (dimensions$L != 0) {
     M.hat <- solveTriBlock(sigma.B.Y, F.i.sR.M, transpose = TRUE)
     }
     sigma.B.Y <- invCholBlock(sigma.B.Y)
     sigma.B.Y.iS.X <- sigma.B.Y %*% iS.X
     i.sigma.alpha.Y <- -t(iS.X) %*% sigma.B.Y.iS.X + calc.X.iS.X(STmodel$LUR,
     iS.X)
     i.sigma.alpha.Y <- try(chol(i.sigma.alpha.Y), silent = TRUE)
     if (class(i.sigma.alpha.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(i.sigma.alpha.Y)
     }
     Y.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.Y
     Y.hat.2 <- solveTriBlock(i.sigma.alpha.Y, Y.hat.2, transpose = TRUE)
     Y.sigma.hat.Y <- dotProd(Y, i.sR.Y) - norm2(Y.hat) -
     norm2(Y.hat.2)
     l <- l - Y.sigma.hat.Y/2
     if (dimensions$L != 0) {
     M.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.M
     M.hat.2 <- solveTriBlock(i.sigma.alpha.Y, M.hat.2,
     transpose = TRUE)
     Y.sigma.hat.M <- (t(Y) %*% i.sR.M - t(Y.hat) %*%
     M.hat - t(Y.hat.2) %*% M.hat.2)
     Y.sigma.hat.M <- t(Y.sigma.hat.M)
     M.sigma.hat.M <- (t(STmodel$ST) %*% i.sR.M - t(M.hat) %*%
     M.hat - t(M.hat.2) %*% M.hat.2)
     M.sigma.hat.M <- try(chol(M.sigma.hat.M), silent = TRUE)
     if (class(M.sigma.hat.M) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(M.sigma.hat.M)
     }
     Y.sigma.hat.M <- solveTriBlock(M.sigma.hat.M, Y.sigma.hat.M,
     transpose = TRUE)
     l <- l + norm2(Y.sigma.hat.M)/2
     }
     }
     l <- as.double(l)
     if (!is.finite(l))
     l <- -.Machine$double.xmax
     return(l)
    }
    <bytecode: 0x55b2284e4f28>
    <environment: namespace:SpatioTemporal>
     --- function search by body ---
    Function loglikeST in namespace SpatioTemporal has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(sigma.B) == "try-error") { :
     the condition has length > 1
    Calls: loglikeST
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.1.9.1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building ‘ST_intro.Rnw’ using Sweave
    Loading required package: Matrix
    Replacing existing trend.
    Replacing existing trend.
    Replacing existing trend.
    --- finished re-building ‘ST_intro.Rnw’
    
    --- re-building ‘ST_tutorial.Rnw’ using Sweave
    Loading required package: Matrix
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpatioTemporal
     --- call from context ---
    loglikeST(est.mesa.model$res.best$par, mesa.model)
     --- call from argument ---
    if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
    }
     --- R stacktrace ---
    where 1: loglikeST(est.mesa.model$res.best$par, mesa.model)
    where 2: eval(expr, .GlobalEnv)
    where 3: eval(expr, .GlobalEnv)
    where 4: withVisible(eval(expr, .GlobalEnv))
    where 5: doTryCatch(return(expr), name, parentenv, handler)
    where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 7: tryCatchList(expr, classes, parentenv, handlers)
    where 8: 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 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 10: evalFunc(ce, options)
    where 11: tryCatchList(expr, classes, parentenv, handlers)
    where 12: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 13: driver$runcode(drobj, chunk, chunkopts)
    where 14: utils::Sweave(...)
    where 15: engine$weave(file, quiet = quiet, encoding = enc)
    where 16: doTryCatch(return(expr), name, parentenv, handler)
    where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 18: tryCatchList(expr, classes, parentenv, handlers)
    where 19: 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)
     }
    }, error = function(e) {
     OK <<- FALSE
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 20: tools:::.buildOneVignette("ST_tutorial.Rnw", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/SpatioTemporal.Rcheck/vign_test/SpatioTemporal",
     TRUE, FALSE, "ST_tutorial", "", "/home/hornik/tmp/scratch/RtmpVJ8RoN/file65070115541.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x = NULL, STmodel, type = "p", x.fixed = NULL)
    {
     stCheckClass(STmodel, "STmodel", name = "STmodel")
     type <- tolower(type)
     x <- stCheckLoglikeIn(x, x.fixed, type)
     if (is.null(x) || any(is.na(x))) {
     return(loglikeSTnames(STmodel, all = (type == "f")))
     }
     dimensions <- loglikeSTdim(STmodel)
     if ((type == "f" && length(x) != dimensions$nparam) || (type !=
     "f" && length(x) != dimensions$nparam.cov)) {
     stop("Number of parameters, length(x), incorrect.")
     }
     tmp <- loglikeSTgetPars(x, STmodel)
     if (type == "f") {
     gamma <- tmp$gamma
     alpha <- tmp$alpha
     }
     cov.pars.beta <- tmp$cov.beta
     cov.pars.nu <- tmp$cov.nu
     Y <- STmodel$obs$obs
     F <- expandF(STmodel$F, STmodel$obs$idx, n.loc = dimensions$n.obs)
     if (type == "f") {
     mu.B <- matrix(calc.mu.B(STmodel$LUR, alpha), ncol = 1)
     if (dimensions$L != 0) {
     Y <- Y - STmodel$ST %*% gamma
     }
     }
     sigma.B <- makeSigmaB(cov.pars.beta$pars, dist = STmodel$D.beta,
     type = STmodel$cov.beta$covf, nugget = cov.pars.beta$nugget)
     sigma.nu <- makeSigmaNu(cov.pars.nu$pars, dist = STmodel$D.nu,
     type = STmodel$cov.nu$covf, nugget = cov.pars.nu$nugget,
     random.effect = cov.pars.nu$random.effect, blocks1 = STmodel$nt,
     ind1 = STmodel$obs$idx, sparse = TRUE)
     sigma.B <- try(makeCholBlock(sigma.B, n.blocks = dimensions$m),
     silent = TRUE)
     if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
     }
     sigma.nu <- try(chol(sigma.nu), silent = TRUE)
     if (class(sigma.nu) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- -sumLogDiag(sigma.B)
     l <- l - sumLog(diag(sigma.nu))
     sigma.B <- invCholBlock(sigma.B, n.blocks = dimensions$m)
     sigma.nu <- chol2inv(sigma.nu)
     i.sR.Y <- as.matrix(sigma.nu %*% Y)
     if (type == "f") {
     i.sB.mu.B <- blockMult(sigma.B, mu.B, n.blocks = dimensions$m)
     l <- l - dotProd(i.sB.mu.B, mu.B)/2
     l <- l - dotProd(i.sR.Y, Y)/2
     }
     else {
     iS.X <- calc.iS.X(STmodel$LUR, sigma.B)
     if (dimensions$L != 0) {
     i.sR.M <- as.matrix(sigma.nu %*% STmodel$ST)
     }
     F.i.sR.Y <- calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     if (dimensions$L != 0) {
     F.i.sR.M <- calc.tFX(STmodel$F, i.sR.M, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     }
     }
     sigma.B.Y <- as.matrix(t(F) %*% sigma.nu %*% F) + sigma.B
     sigma.B.Y <- try(chol(sigma.B.Y), silent = TRUE)
     if (class(sigma.B.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- l - sumLogDiag(sigma.B.Y)
     if (type == "f") {
     mu.B.Y <- i.sB.mu.B + calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     mu.B.Y <- solveTriBlock(sigma.B.Y, mu.B.Y, transpose = TRUE)
     l <- l + norm2(mu.B.Y)/2
     }
     else {
     Y.hat <- solveTriBlock(sigma.B.Y, F.i.sR.Y, transpose = TRUE)
     if (dimensions$L != 0) {
     M.hat <- solveTriBlock(sigma.B.Y, F.i.sR.M, transpose = TRUE)
     }
     sigma.B.Y <- invCholBlock(sigma.B.Y)
     sigma.B.Y.iS.X <- sigma.B.Y %*% iS.X
     i.sigma.alpha.Y <- -t(iS.X) %*% sigma.B.Y.iS.X + calc.X.iS.X(STmodel$LUR,
     iS.X)
     i.sigma.alpha.Y <- try(chol(i.sigma.alpha.Y), silent = TRUE)
     if (class(i.sigma.alpha.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(i.sigma.alpha.Y)
     }
     Y.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.Y
     Y.hat.2 <- solveTriBlock(i.sigma.alpha.Y, Y.hat.2, transpose = TRUE)
     Y.sigma.hat.Y <- dotProd(Y, i.sR.Y) - norm2(Y.hat) -
     norm2(Y.hat.2)
     l <- l - Y.sigma.hat.Y/2
     if (dimensions$L != 0) {
     M.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.M
     M.hat.2 <- solveTriBlock(i.sigma.alpha.Y, M.hat.2,
     transpose = TRUE)
     Y.sigma.hat.M <- (t(Y) %*% i.sR.M - t(Y.hat) %*%
     M.hat - t(Y.hat.2) %*% M.hat.2)
     Y.sigma.hat.M <- t(Y.sigma.hat.M)
     M.sigma.hat.M <- (t(STmodel$ST) %*% i.sR.M - t(M.hat) %*%
     M.hat - t(M.hat.2) %*% M.hat.2)
     M.sigma.hat.M <- try(chol(M.sigma.hat.M), silent = TRUE)
     if (class(M.sigma.hat.M) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(M.sigma.hat.M)
     }
     Y.sigma.hat.M <- solveTriBlock(M.sigma.hat.M, Y.sigma.hat.M,
     transpose = TRUE)
     l <- l + norm2(Y.sigma.hat.M)/2
     }
     }
     l <- as.double(l)
     if (!is.finite(l))
     l <- -.Machine$double.xmax
     return(l)
    }
    <bytecode: 0x5646a3124f48>
    <environment: namespace:SpatioTemporal>
     --- function search by body ---
    Function loglikeST in namespace SpatioTemporal has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'ST_tutorial.Rnw' failed with diagnostics:
     chunk 34
    Error in if (class(sigma.B) == "try-error") { :
     the condition has length > 1
    
    --- failed re-building ‘ST_tutorial.Rnw’
    
    SUMMARY: processing the following file failed:
     ‘ST_tutorial.Rnw’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.1.9.1
Check: examples
Result: ERROR
    Running examples in ‘SpatioTemporal-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: loglikeST
    > ### Title: Compute the Log-likelihood for the Spatio-Temporal Model
    > ### Aliases: loglikeST loglikeSTnaive
    >
    > ### ** Examples
    >
    > ##load the data
    > data(mesa.model)
    >
    > ##Compute dimensions for the data structure
    > dim <- loglikeSTdim(mesa.model)
    >
    > ##Find out in which order parameters should be given
    > loglikeST(NULL, mesa.model)
     [1] "log.range.const.exp" "log.sill.const.exp"
     [3] "log.range.V1.exp" "log.sill.V1.exp"
     [5] "log.range.V2.exp" "log.sill.V2.exp"
     [7] "nu.log.range.exp" "nu.log.sill.exp"
     [9] "nu.log.nugget.(Intercept).exp" "nu.log.nugget.typeFIXED.exp"
    >
    > ##Let's create random vectors of values
    > x <- runif( dim$nparam.cov )
    > x.all <- runif( dim$nparam )
    >
    > ##Evaluate the log-likelihood for these values
    > loglikeST(x.all, mesa.model, "f")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpatioTemporal
     --- call from context ---
    loglikeST(x.all, mesa.model, "f")
     --- call from argument ---
    if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
    }
     --- R stacktrace ---
    where 1: loglikeST(x.all, mesa.model, "f")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x = NULL, STmodel, type = "p", x.fixed = NULL)
    {
     stCheckClass(STmodel, "STmodel", name = "STmodel")
     type <- tolower(type)
     x <- stCheckLoglikeIn(x, x.fixed, type)
     if (is.null(x) || any(is.na(x))) {
     return(loglikeSTnames(STmodel, all = (type == "f")))
     }
     dimensions <- loglikeSTdim(STmodel)
     if ((type == "f" && length(x) != dimensions$nparam) || (type !=
     "f" && length(x) != dimensions$nparam.cov)) {
     stop("Number of parameters, length(x), incorrect.")
     }
     tmp <- loglikeSTgetPars(x, STmodel)
     if (type == "f") {
     gamma <- tmp$gamma
     alpha <- tmp$alpha
     }
     cov.pars.beta <- tmp$cov.beta
     cov.pars.nu <- tmp$cov.nu
     Y <- STmodel$obs$obs
     F <- expandF(STmodel$F, STmodel$obs$idx, n.loc = dimensions$n.obs)
     if (type == "f") {
     mu.B <- matrix(calc.mu.B(STmodel$LUR, alpha), ncol = 1)
     if (dimensions$L != 0) {
     Y <- Y - STmodel$ST %*% gamma
     }
     }
     sigma.B <- makeSigmaB(cov.pars.beta$pars, dist = STmodel$D.beta,
     type = STmodel$cov.beta$covf, nugget = cov.pars.beta$nugget)
     sigma.nu <- makeSigmaNu(cov.pars.nu$pars, dist = STmodel$D.nu,
     type = STmodel$cov.nu$covf, nugget = cov.pars.nu$nugget,
     random.effect = cov.pars.nu$random.effect, blocks1 = STmodel$nt,
     ind1 = STmodel$obs$idx, sparse = TRUE)
     sigma.B <- try(makeCholBlock(sigma.B, n.blocks = dimensions$m),
     silent = TRUE)
     if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
     }
     sigma.nu <- try(chol(sigma.nu), silent = TRUE)
     if (class(sigma.nu) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- -sumLogDiag(sigma.B)
     l <- l - sumLog(diag(sigma.nu))
     sigma.B <- invCholBlock(sigma.B, n.blocks = dimensions$m)
     sigma.nu <- chol2inv(sigma.nu)
     i.sR.Y <- as.matrix(sigma.nu %*% Y)
     if (type == "f") {
     i.sB.mu.B <- blockMult(sigma.B, mu.B, n.blocks = dimensions$m)
     l <- l - dotProd(i.sB.mu.B, mu.B)/2
     l <- l - dotProd(i.sR.Y, Y)/2
     }
     else {
     iS.X <- calc.iS.X(STmodel$LUR, sigma.B)
     if (dimensions$L != 0) {
     i.sR.M <- as.matrix(sigma.nu %*% STmodel$ST)
     }
     F.i.sR.Y <- calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     if (dimensions$L != 0) {
     F.i.sR.M <- calc.tFX(STmodel$F, i.sR.M, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     }
     }
     sigma.B.Y <- as.matrix(t(F) %*% sigma.nu %*% F) + sigma.B
     sigma.B.Y <- try(chol(sigma.B.Y), silent = TRUE)
     if (class(sigma.B.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- l - sumLogDiag(sigma.B.Y)
     if (type == "f") {
     mu.B.Y <- i.sB.mu.B + calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     mu.B.Y <- solveTriBlock(sigma.B.Y, mu.B.Y, transpose = TRUE)
     l <- l + norm2(mu.B.Y)/2
     }
     else {
     Y.hat <- solveTriBlock(sigma.B.Y, F.i.sR.Y, transpose = TRUE)
     if (dimensions$L != 0) {
     M.hat <- solveTriBlock(sigma.B.Y, F.i.sR.M, transpose = TRUE)
     }
     sigma.B.Y <- invCholBlock(sigma.B.Y)
     sigma.B.Y.iS.X <- sigma.B.Y %*% iS.X
     i.sigma.alpha.Y <- -t(iS.X) %*% sigma.B.Y.iS.X + calc.X.iS.X(STmodel$LUR,
     iS.X)
     i.sigma.alpha.Y <- try(chol(i.sigma.alpha.Y), silent = TRUE)
     if (class(i.sigma.alpha.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(i.sigma.alpha.Y)
     }
     Y.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.Y
     Y.hat.2 <- solveTriBlock(i.sigma.alpha.Y, Y.hat.2, transpose = TRUE)
     Y.sigma.hat.Y <- dotProd(Y, i.sR.Y) - norm2(Y.hat) -
     norm2(Y.hat.2)
     l <- l - Y.sigma.hat.Y/2
     if (dimensions$L != 0) {
     M.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.M
     M.hat.2 <- solveTriBlock(i.sigma.alpha.Y, M.hat.2,
     transpose = TRUE)
     Y.sigma.hat.M <- (t(Y) %*% i.sR.M - t(Y.hat) %*%
     M.hat - t(Y.hat.2) %*% M.hat.2)
     Y.sigma.hat.M <- t(Y.sigma.hat.M)
     M.sigma.hat.M <- (t(STmodel$ST) %*% i.sR.M - t(M.hat) %*%
     M.hat - t(M.hat.2) %*% M.hat.2)
     M.sigma.hat.M <- try(chol(M.sigma.hat.M), silent = TRUE)
     if (class(M.sigma.hat.M) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(M.sigma.hat.M)
     }
     Y.sigma.hat.M <- solveTriBlock(M.sigma.hat.M, Y.sigma.hat.M,
     transpose = TRUE)
     l <- l + norm2(Y.sigma.hat.M)/2
     }
     }
     l <- as.double(l)
     if (!is.finite(l))
     l <- -.Machine$double.xmax
     return(l)
    }
    <bytecode: 0x45a7350>
    <environment: namespace:SpatioTemporal>
     --- function search by body ---
    Function loglikeST in namespace SpatioTemporal has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(sigma.B) == "try-error") { :
     the condition has length > 1
    Calls: loglikeST
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.1.9.1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘ST_intro.Rnw’ using Sweave
    Loading required package: Matrix
    Replacing existing trend.
    Replacing existing trend.
    Replacing existing trend.
    --- finished re-building ‘ST_intro.Rnw’
    
    --- re-building ‘ST_tutorial.Rnw’ using Sweave
    Loading required package: Matrix
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpatioTemporal
     --- call from context ---
    loglikeST(est.mesa.model$res.best$par, mesa.model)
     --- call from argument ---
    if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
    }
     --- R stacktrace ---
    where 1: loglikeST(est.mesa.model$res.best$par, mesa.model)
    where 2: eval(expr, .GlobalEnv)
    where 3: eval(expr, .GlobalEnv)
    where 4: withVisible(eval(expr, .GlobalEnv))
    where 5: doTryCatch(return(expr), name, parentenv, handler)
    where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 7: tryCatchList(expr, classes, parentenv, handlers)
    where 8: 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 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 10: evalFunc(ce, options)
    where 11: tryCatchList(expr, classes, parentenv, handlers)
    where 12: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 13: driver$runcode(drobj, chunk, chunkopts)
    where 14: utils::Sweave(...)
    where 15: engine$weave(file, quiet = quiet, encoding = enc)
    where 16: doTryCatch(return(expr), name, parentenv, handler)
    where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 18: tryCatchList(expr, classes, parentenv, handlers)
    where 19: 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)
     }
    }, error = function(e) {
     OK <<- FALSE
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 20: tools:::.buildOneVignette("ST_tutorial.Rnw", "/data/gannet/ripley/R/packages/tests-clang/SpatioTemporal.Rcheck/vign_test/SpatioTemporal",
     TRUE, FALSE, "ST_tutorial", "", "/tmp/RtmppF5fxJ/working_dir/RtmpzzI0IQ/file961553153cab.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x = NULL, STmodel, type = "p", x.fixed = NULL)
    {
     stCheckClass(STmodel, "STmodel", name = "STmodel")
     type <- tolower(type)
     x <- stCheckLoglikeIn(x, x.fixed, type)
     if (is.null(x) || any(is.na(x))) {
     return(loglikeSTnames(STmodel, all = (type == "f")))
     }
     dimensions <- loglikeSTdim(STmodel)
     if ((type == "f" && length(x) != dimensions$nparam) || (type !=
     "f" && length(x) != dimensions$nparam.cov)) {
     stop("Number of parameters, length(x), incorrect.")
     }
     tmp <- loglikeSTgetPars(x, STmodel)
     if (type == "f") {
     gamma <- tmp$gamma
     alpha <- tmp$alpha
     }
     cov.pars.beta <- tmp$cov.beta
     cov.pars.nu <- tmp$cov.nu
     Y <- STmodel$obs$obs
     F <- expandF(STmodel$F, STmodel$obs$idx, n.loc = dimensions$n.obs)
     if (type == "f") {
     mu.B <- matrix(calc.mu.B(STmodel$LUR, alpha), ncol = 1)
     if (dimensions$L != 0) {
     Y <- Y - STmodel$ST %*% gamma
     }
     }
     sigma.B <- makeSigmaB(cov.pars.beta$pars, dist = STmodel$D.beta,
     type = STmodel$cov.beta$covf, nugget = cov.pars.beta$nugget)
     sigma.nu <- makeSigmaNu(cov.pars.nu$pars, dist = STmodel$D.nu,
     type = STmodel$cov.nu$covf, nugget = cov.pars.nu$nugget,
     random.effect = cov.pars.nu$random.effect, blocks1 = STmodel$nt,
     ind1 = STmodel$obs$idx, sparse = TRUE)
     sigma.B <- try(makeCholBlock(sigma.B, n.blocks = dimensions$m),
     silent = TRUE)
     if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
     }
     sigma.nu <- try(chol(sigma.nu), silent = TRUE)
     if (class(sigma.nu) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- -sumLogDiag(sigma.B)
     l <- l - sumLog(diag(sigma.nu))
     sigma.B <- invCholBlock(sigma.B, n.blocks = dimensions$m)
     sigma.nu <- chol2inv(sigma.nu)
     i.sR.Y <- as.matrix(sigma.nu %*% Y)
     if (type == "f") {
     i.sB.mu.B <- blockMult(sigma.B, mu.B, n.blocks = dimensions$m)
     l <- l - dotProd(i.sB.mu.B, mu.B)/2
     l <- l - dotProd(i.sR.Y, Y)/2
     }
     else {
     iS.X <- calc.iS.X(STmodel$LUR, sigma.B)
     if (dimensions$L != 0) {
     i.sR.M <- as.matrix(sigma.nu %*% STmodel$ST)
     }
     F.i.sR.Y <- calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     if (dimensions$L != 0) {
     F.i.sR.M <- calc.tFX(STmodel$F, i.sR.M, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     }
     }
     sigma.B.Y <- as.matrix(t(F) %*% sigma.nu %*% F) + sigma.B
     sigma.B.Y <- try(chol(sigma.B.Y), silent = TRUE)
     if (class(sigma.B.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- l - sumLogDiag(sigma.B.Y)
     if (type == "f") {
     mu.B.Y <- i.sB.mu.B + calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     mu.B.Y <- solveTriBlock(sigma.B.Y, mu.B.Y, transpose = TRUE)
     l <- l + norm2(mu.B.Y)/2
     }
     else {
     Y.hat <- solveTriBlock(sigma.B.Y, F.i.sR.Y, transpose = TRUE)
     if (dimensions$L != 0) {
     M.hat <- solveTriBlock(sigma.B.Y, F.i.sR.M, transpose = TRUE)
     }
     sigma.B.Y <- invCholBlock(sigma.B.Y)
     sigma.B.Y.iS.X <- sigma.B.Y %*% iS.X
     i.sigma.alpha.Y <- -t(iS.X) %*% sigma.B.Y.iS.X + calc.X.iS.X(STmodel$LUR,
     iS.X)
     i.sigma.alpha.Y <- try(chol(i.sigma.alpha.Y), silent = TRUE)
     if (class(i.sigma.alpha.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(i.sigma.alpha.Y)
     }
     Y.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.Y
     Y.hat.2 <- solveTriBlock(i.sigma.alpha.Y, Y.hat.2, transpose = TRUE)
     Y.sigma.hat.Y <- dotProd(Y, i.sR.Y) - norm2(Y.hat) -
     norm2(Y.hat.2)
     l <- l - Y.sigma.hat.Y/2
     if (dimensions$L != 0) {
     M.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.M
     M.hat.2 <- solveTriBlock(i.sigma.alpha.Y, M.hat.2,
     transpose = TRUE)
     Y.sigma.hat.M <- (t(Y) %*% i.sR.M - t(Y.hat) %*%
     M.hat - t(Y.hat.2) %*% M.hat.2)
     Y.sigma.hat.M <- t(Y.sigma.hat.M)
     M.sigma.hat.M <- (t(STmodel$ST) %*% i.sR.M - t(M.hat) %*%
     M.hat - t(M.hat.2) %*% M.hat.2)
     M.sigma.hat.M <- try(chol(M.sigma.hat.M), silent = TRUE)
     if (class(M.sigma.hat.M) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(M.sigma.hat.M)
     }
     Y.sigma.hat.M <- solveTriBlock(M.sigma.hat.M, Y.sigma.hat.M,
     transpose = TRUE)
     l <- l + norm2(Y.sigma.hat.M)/2
     }
     }
     l <- as.double(l)
     if (!is.finite(l))
     l <- -.Machine$double.xmax
     return(l)
    }
    <bytecode: 0x988ab08>
    <environment: namespace:SpatioTemporal>
     --- function search by body ---
    Function loglikeST in namespace SpatioTemporal has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'ST_tutorial.Rnw' failed with diagnostics:
     chunk 34
    Error in if (class(sigma.B) == "try-error") { :
     the condition has length > 1
    
    --- failed re-building ‘ST_tutorial.Rnw’
    
    SUMMARY: processing the following file failed:
     ‘ST_tutorial.Rnw’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.1.9.1
Check: examples
Result: ERROR
    Running examples in ‘SpatioTemporal-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: loglikeST
    > ### Title: Compute the Log-likelihood for the Spatio-Temporal Model
    > ### Aliases: loglikeST loglikeSTnaive
    >
    > ### ** Examples
    >
    > ##load the data
    > data(mesa.model)
    >
    > ##Compute dimensions for the data structure
    > dim <- loglikeSTdim(mesa.model)
    >
    > ##Find out in which order parameters should be given
    > loglikeST(NULL, mesa.model)
     [1] "log.range.const.exp" "log.sill.const.exp"
     [3] "log.range.V1.exp" "log.sill.V1.exp"
     [5] "log.range.V2.exp" "log.sill.V2.exp"
     [7] "nu.log.range.exp" "nu.log.sill.exp"
     [9] "nu.log.nugget.(Intercept).exp" "nu.log.nugget.typeFIXED.exp"
    >
    > ##Let's create random vectors of values
    > x <- runif( dim$nparam.cov )
    > x.all <- runif( dim$nparam )
    >
    > ##Evaluate the log-likelihood for these values
    > loglikeST(x.all, mesa.model, "f")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpatioTemporal
     --- call from context ---
    loglikeST(x.all, mesa.model, "f")
     --- call from argument ---
    if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
    }
     --- R stacktrace ---
    where 1: loglikeST(x.all, mesa.model, "f")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x = NULL, STmodel, type = "p", x.fixed = NULL)
    {
     stCheckClass(STmodel, "STmodel", name = "STmodel")
     type <- tolower(type)
     x <- stCheckLoglikeIn(x, x.fixed, type)
     if (is.null(x) || any(is.na(x))) {
     return(loglikeSTnames(STmodel, all = (type == "f")))
     }
     dimensions <- loglikeSTdim(STmodel)
     if ((type == "f" && length(x) != dimensions$nparam) || (type !=
     "f" && length(x) != dimensions$nparam.cov)) {
     stop("Number of parameters, length(x), incorrect.")
     }
     tmp <- loglikeSTgetPars(x, STmodel)
     if (type == "f") {
     gamma <- tmp$gamma
     alpha <- tmp$alpha
     }
     cov.pars.beta <- tmp$cov.beta
     cov.pars.nu <- tmp$cov.nu
     Y <- STmodel$obs$obs
     F <- expandF(STmodel$F, STmodel$obs$idx, n.loc = dimensions$n.obs)
     if (type == "f") {
     mu.B <- matrix(calc.mu.B(STmodel$LUR, alpha), ncol = 1)
     if (dimensions$L != 0) {
     Y <- Y - STmodel$ST %*% gamma
     }
     }
     sigma.B <- makeSigmaB(cov.pars.beta$pars, dist = STmodel$D.beta,
     type = STmodel$cov.beta$covf, nugget = cov.pars.beta$nugget)
     sigma.nu <- makeSigmaNu(cov.pars.nu$pars, dist = STmodel$D.nu,
     type = STmodel$cov.nu$covf, nugget = cov.pars.nu$nugget,
     random.effect = cov.pars.nu$random.effect, blocks1 = STmodel$nt,
     ind1 = STmodel$obs$idx, sparse = TRUE)
     sigma.B <- try(makeCholBlock(sigma.B, n.blocks = dimensions$m),
     silent = TRUE)
     if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
     }
     sigma.nu <- try(chol(sigma.nu), silent = TRUE)
     if (class(sigma.nu) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- -sumLogDiag(sigma.B)
     l <- l - sumLog(diag(sigma.nu))
     sigma.B <- invCholBlock(sigma.B, n.blocks = dimensions$m)
     sigma.nu <- chol2inv(sigma.nu)
     i.sR.Y <- as.matrix(sigma.nu %*% Y)
     if (type == "f") {
     i.sB.mu.B <- blockMult(sigma.B, mu.B, n.blocks = dimensions$m)
     l <- l - dotProd(i.sB.mu.B, mu.B)/2
     l <- l - dotProd(i.sR.Y, Y)/2
     }
     else {
     iS.X <- calc.iS.X(STmodel$LUR, sigma.B)
     if (dimensions$L != 0) {
     i.sR.M <- as.matrix(sigma.nu %*% STmodel$ST)
     }
     F.i.sR.Y <- calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     if (dimensions$L != 0) {
     F.i.sR.M <- calc.tFX(STmodel$F, i.sR.M, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     }
     }
     sigma.B.Y <- as.matrix(t(F) %*% sigma.nu %*% F) + sigma.B
     sigma.B.Y <- try(chol(sigma.B.Y), silent = TRUE)
     if (class(sigma.B.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- l - sumLogDiag(sigma.B.Y)
     if (type == "f") {
     mu.B.Y <- i.sB.mu.B + calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     mu.B.Y <- solveTriBlock(sigma.B.Y, mu.B.Y, transpose = TRUE)
     l <- l + norm2(mu.B.Y)/2
     }
     else {
     Y.hat <- solveTriBlock(sigma.B.Y, F.i.sR.Y, transpose = TRUE)
     if (dimensions$L != 0) {
     M.hat <- solveTriBlock(sigma.B.Y, F.i.sR.M, transpose = TRUE)
     }
     sigma.B.Y <- invCholBlock(sigma.B.Y)
     sigma.B.Y.iS.X <- sigma.B.Y %*% iS.X
     i.sigma.alpha.Y <- -t(iS.X) %*% sigma.B.Y.iS.X + calc.X.iS.X(STmodel$LUR,
     iS.X)
     i.sigma.alpha.Y <- try(chol(i.sigma.alpha.Y), silent = TRUE)
     if (class(i.sigma.alpha.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(i.sigma.alpha.Y)
     }
     Y.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.Y
     Y.hat.2 <- solveTriBlock(i.sigma.alpha.Y, Y.hat.2, transpose = TRUE)
     Y.sigma.hat.Y <- dotProd(Y, i.sR.Y) - norm2(Y.hat) -
     norm2(Y.hat.2)
     l <- l - Y.sigma.hat.Y/2
     if (dimensions$L != 0) {
     M.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.M
     M.hat.2 <- solveTriBlock(i.sigma.alpha.Y, M.hat.2,
     transpose = TRUE)
     Y.sigma.hat.M <- (t(Y) %*% i.sR.M - t(Y.hat) %*%
     M.hat - t(Y.hat.2) %*% M.hat.2)
     Y.sigma.hat.M <- t(Y.sigma.hat.M)
     M.sigma.hat.M <- (t(STmodel$ST) %*% i.sR.M - t(M.hat) %*%
     M.hat - t(M.hat.2) %*% M.hat.2)
     M.sigma.hat.M <- try(chol(M.sigma.hat.M), silent = TRUE)
     if (class(M.sigma.hat.M) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(M.sigma.hat.M)
     }
     Y.sigma.hat.M <- solveTriBlock(M.sigma.hat.M, Y.sigma.hat.M,
     transpose = TRUE)
     l <- l + norm2(Y.sigma.hat.M)/2
     }
     }
     l <- as.double(l)
     if (!is.finite(l))
     l <- -.Machine$double.xmax
     return(l)
    }
    <bytecode: 0x2a8ff40>
    <environment: namespace:SpatioTemporal>
     --- function search by body ---
    Function loglikeST in namespace SpatioTemporal has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(sigma.B) == "try-error") { :
     the condition has length > 1
    Calls: loglikeST
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 1.1.9.1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘ST_intro.Rnw’ using Sweave
    Loading required package: Matrix
    Replacing existing trend.
    Replacing existing trend.
    Replacing existing trend.
    --- finished re-building ‘ST_intro.Rnw’
    
    --- re-building ‘ST_tutorial.Rnw’ using Sweave
    Loading required package: Matrix
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpatioTemporal
     --- call from context ---
    loglikeST(est.mesa.model$res.best$par, mesa.model)
     --- call from argument ---
    if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
    }
     --- R stacktrace ---
    where 1: loglikeST(est.mesa.model$res.best$par, mesa.model)
    where 2: eval(expr, .GlobalEnv)
    where 3: eval(expr, .GlobalEnv)
    where 4: withVisible(eval(expr, .GlobalEnv))
    where 5: doTryCatch(return(expr), name, parentenv, handler)
    where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 7: tryCatchList(expr, classes, parentenv, handlers)
    where 8: 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 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 10: evalFunc(ce, options)
    where 11: tryCatchList(expr, classes, parentenv, handlers)
    where 12: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 13: driver$runcode(drobj, chunk, chunkopts)
    where 14: utils::Sweave(...)
    where 15: engine$weave(file, quiet = quiet, encoding = enc)
    where 16: doTryCatch(return(expr), name, parentenv, handler)
    where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 18: tryCatchList(expr, classes, parentenv, handlers)
    where 19: 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)
     }
    }, error = function(e) {
     OK <<- FALSE
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 20: tools:::.buildOneVignette("ST_tutorial.Rnw", "/data/gannet/ripley/R/packages/tests-devel/SpatioTemporal.Rcheck/vign_test/SpatioTemporal",
     TRUE, FALSE, "ST_tutorial", "", "/tmp/RtmptwmPr1/working_dir/RtmprNoxMQ/file37524abe2c59.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x = NULL, STmodel, type = "p", x.fixed = NULL)
    {
     stCheckClass(STmodel, "STmodel", name = "STmodel")
     type <- tolower(type)
     x <- stCheckLoglikeIn(x, x.fixed, type)
     if (is.null(x) || any(is.na(x))) {
     return(loglikeSTnames(STmodel, all = (type == "f")))
     }
     dimensions <- loglikeSTdim(STmodel)
     if ((type == "f" && length(x) != dimensions$nparam) || (type !=
     "f" && length(x) != dimensions$nparam.cov)) {
     stop("Number of parameters, length(x), incorrect.")
     }
     tmp <- loglikeSTgetPars(x, STmodel)
     if (type == "f") {
     gamma <- tmp$gamma
     alpha <- tmp$alpha
     }
     cov.pars.beta <- tmp$cov.beta
     cov.pars.nu <- tmp$cov.nu
     Y <- STmodel$obs$obs
     F <- expandF(STmodel$F, STmodel$obs$idx, n.loc = dimensions$n.obs)
     if (type == "f") {
     mu.B <- matrix(calc.mu.B(STmodel$LUR, alpha), ncol = 1)
     if (dimensions$L != 0) {
     Y <- Y - STmodel$ST %*% gamma
     }
     }
     sigma.B <- makeSigmaB(cov.pars.beta$pars, dist = STmodel$D.beta,
     type = STmodel$cov.beta$covf, nugget = cov.pars.beta$nugget)
     sigma.nu <- makeSigmaNu(cov.pars.nu$pars, dist = STmodel$D.nu,
     type = STmodel$cov.nu$covf, nugget = cov.pars.nu$nugget,
     random.effect = cov.pars.nu$random.effect, blocks1 = STmodel$nt,
     ind1 = STmodel$obs$idx, sparse = TRUE)
     sigma.B <- try(makeCholBlock(sigma.B, n.blocks = dimensions$m),
     silent = TRUE)
     if (class(sigma.B) == "try-error") {
     return(-.Machine$double.xmax)
     }
     sigma.nu <- try(chol(sigma.nu), silent = TRUE)
     if (class(sigma.nu) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- -sumLogDiag(sigma.B)
     l <- l - sumLog(diag(sigma.nu))
     sigma.B <- invCholBlock(sigma.B, n.blocks = dimensions$m)
     sigma.nu <- chol2inv(sigma.nu)
     i.sR.Y <- as.matrix(sigma.nu %*% Y)
     if (type == "f") {
     i.sB.mu.B <- blockMult(sigma.B, mu.B, n.blocks = dimensions$m)
     l <- l - dotProd(i.sB.mu.B, mu.B)/2
     l <- l - dotProd(i.sR.Y, Y)/2
     }
     else {
     iS.X <- calc.iS.X(STmodel$LUR, sigma.B)
     if (dimensions$L != 0) {
     i.sR.M <- as.matrix(sigma.nu %*% STmodel$ST)
     }
     F.i.sR.Y <- calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     if (dimensions$L != 0) {
     F.i.sR.M <- calc.tFX(STmodel$F, i.sR.M, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     }
     }
     sigma.B.Y <- as.matrix(t(F) %*% sigma.nu %*% F) + sigma.B
     sigma.B.Y <- try(chol(sigma.B.Y), silent = TRUE)
     if (class(sigma.B.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     l <- l - sumLogDiag(sigma.B.Y)
     if (type == "f") {
     mu.B.Y <- i.sB.mu.B + calc.tFX(STmodel$F, i.sR.Y, STmodel$obs$idx,
     n.loc = dimensions$n.obs)
     mu.B.Y <- solveTriBlock(sigma.B.Y, mu.B.Y, transpose = TRUE)
     l <- l + norm2(mu.B.Y)/2
     }
     else {
     Y.hat <- solveTriBlock(sigma.B.Y, F.i.sR.Y, transpose = TRUE)
     if (dimensions$L != 0) {
     M.hat <- solveTriBlock(sigma.B.Y, F.i.sR.M, transpose = TRUE)
     }
     sigma.B.Y <- invCholBlock(sigma.B.Y)
     sigma.B.Y.iS.X <- sigma.B.Y %*% iS.X
     i.sigma.alpha.Y <- -t(iS.X) %*% sigma.B.Y.iS.X + calc.X.iS.X(STmodel$LUR,
     iS.X)
     i.sigma.alpha.Y <- try(chol(i.sigma.alpha.Y), silent = TRUE)
     if (class(i.sigma.alpha.Y) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(i.sigma.alpha.Y)
     }
     Y.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.Y
     Y.hat.2 <- solveTriBlock(i.sigma.alpha.Y, Y.hat.2, transpose = TRUE)
     Y.sigma.hat.Y <- dotProd(Y, i.sR.Y) - norm2(Y.hat) -
     norm2(Y.hat.2)
     l <- l - Y.sigma.hat.Y/2
     if (dimensions$L != 0) {
     M.hat.2 <- t(sigma.B.Y.iS.X) %*% F.i.sR.M
     M.hat.2 <- solveTriBlock(i.sigma.alpha.Y, M.hat.2,
     transpose = TRUE)
     Y.sigma.hat.M <- (t(Y) %*% i.sR.M - t(Y.hat) %*%
     M.hat - t(Y.hat.2) %*% M.hat.2)
     Y.sigma.hat.M <- t(Y.sigma.hat.M)
     M.sigma.hat.M <- (t(STmodel$ST) %*% i.sR.M - t(M.hat) %*%
     M.hat - t(M.hat.2) %*% M.hat.2)
     M.sigma.hat.M <- try(chol(M.sigma.hat.M), silent = TRUE)
     if (class(M.sigma.hat.M) == "try-error") {
     return(-.Machine$double.xmax)
     }
     if (type == "r") {
     l <- l - sumLogDiag(M.sigma.hat.M)
     }
     Y.sigma.hat.M <- solveTriBlock(M.sigma.hat.M, Y.sigma.hat.M,
     transpose = TRUE)
     l <- l + norm2(Y.sigma.hat.M)/2
     }
     }
     l <- as.double(l)
     if (!is.finite(l))
     l <- -.Machine$double.xmax
     return(l)
    }
    <bytecode: 0x9a928b8>
    <environment: namespace:SpatioTemporal>
     --- function search by body ---
    Function loglikeST in namespace SpatioTemporal has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'ST_tutorial.Rnw' failed with diagnostics:
     chunk 34
    Error in if (class(sigma.B) == "try-error") { :
     the condition has length > 1
    
    --- failed re-building ‘ST_tutorial.Rnw’
    
    SUMMARY: processing the following file failed:
     ‘ST_tutorial.Rnw’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc