Error(s) in re-building vignettes:
  ...
--- re-building 'Generalized_Hyperbolic_Distribution.Rnw' using Sweave
Loading required package: numDeriv
Loading required package: gplots

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in (psi + skewness.norm) * (chi + Q) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning in log.const.top + log.top :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
ghyp
 --- call from context --- 
.mle.default(data = data, pdf = ".dghypuv", vars = vars, opt.pars = opt.pars, 
    transform = transform, se = T, silent = silent, ...)
 --- call from argument --- 
if (class(inv.hess) == "try-error") {
    warning("Hessian matrix is singular!")
    inv.hess <- matrix(NA, ncol(hess), ncol(hess), dimnames = dimnames(hess))
}
 --- R stacktrace ---
where 1: .mle.default(data = data, pdf = ".dghypuv", vars = vars, opt.pars = opt.pars, 
    transform = transform, se = T, silent = silent, ...)
where 2: fit.ghypuv(data = data, lambda = 1, opt.pars = c(lambda = F, 
    opt.pars), symmetric = symmetric, ...)
where 3: fit.hypuv(data = smi.stocks[, c("SMI")], silent = TRUE)
where 4: eval(expr, .GlobalEnv)
where 5: eval(expr, .GlobalEnv)
where 6: withVisible(eval(expr, .GlobalEnv))
where 7: doTryCatch(return(expr), name, parentenv, handler)
where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 9: tryCatchList(expr, classes, parentenv, handlers)
where 10: 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 11: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 12: evalFunc(ce, options)
where 13: tryCatchList(expr, classes, parentenv, handlers)
where 14: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 15: driver$runcode(drobj, chunk, chunkopts)
where 16: utils::Sweave(...)
where 17: engine$weave(file, quiet = quiet, encoding = enc)
where 18: doTryCatch(return(expr), name, parentenv, handler)
where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 20: tryCatchList(expr, classes, parentenv, handlers)
where 21: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
    outputs <- c(outputs, output)
}, error = function(e) {
    thisOK <<- FALSE
    fails <<- c(fails, file)
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 22: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/ghyp.Rcheck/vign_test/ghyp", 
    ser_elibs = "/tmp/RtmpFwlUiK/file55f05966833e.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (data, pdf, vars, opt.pars = rep(TRUE, length(vars)), 
    transform = NULL, se = FALSE, na.rm = FALSE, silent = FALSE, 
    ...) 
{
    if (na.rm) {
        data <- data[!is.na(data)]
    }
    else {
        if (any(is.na(data))) {
            stop(".mle.default: The sample contains NAs!\n", 
                "Set na.rm = TRUE to remove the rows which contain NAs.\n")
        }
    }
    opt.pars <- opt.pars[match(names(vars), names(opt.pars))]
    theta <- vars[opt.pars]
    theta.backup <- theta
    trace.pars <- NULL
    negloglik <- function(theta, pdf, tmp.data, transf, const.pars, 
        silent, par.names) {
        theta.backup <<- theta
        for (nam in intersect(names(theta), names(transf))) {
            theta[nam] = do.call(transf[nam], list(theta[nam]))
        }
        pars <- c(theta, const.pars)
        trace.pars <<- rbind(trace.pars, pars[match(par.names, 
            names(pars))])
        pdf.args = c(list(x = tmp.data, logvalue = TRUE), as.list(pars))
        llh <- -sum(do.call(pdf, pdf.args))
        if (!silent) {
            print(paste("Llh: ", sprintf("% .14E", -llh), "; Pars: ", 
                paste(sprintf("% .6E", theta), collapse = ", "), 
                sep = ""))
        }
        return(llh)
    }
    fit <- try(optim(theta, negloglik, hessian = se, pdf = pdf, 
        tmp.data = data, transf = transform, const.pars = vars[!opt.pars], 
        silent = silent, par.names = names(vars), ...))
    if (class(fit) == "try-error") {
        convergence <- 100
        hess <- as.numeric(NA)
        n.iter <- as.numeric(NA)
        inv.hess <- matrix(NA)
        message <- fit
        par.ests <- theta.backup
        for (nam in intersect(names(par.ests), names(transform))) {
            par.ests[nam] <- do.call(transform[nam], list(par.ests[nam]))
        }
        vars[opt.pars] <- par.ests
        pdf.args <- c(list(x = data, logvalue = TRUE), as.list(vars))
        ll.max <- -sum(do.call(".dghypuv", pdf.args))
    }
    else {
        par.ests <- fit$par
        names(par.ests) <- names(theta)
        for (nam in intersect(names(par.ests), names(transform))) {
            par.ests[nam] <- do.call(transform[nam], list(par.ests[nam]))
        }
        vars[opt.pars] <- par.ests
        convergence <- fit$convergence
        n.iter <- fit$counts[1]
        ll.max <- -fit$value
        message <- NULL
        if (se) {
            hess <- fit$hessian
            par.ses <- suppressWarnings(sqrt(diag(hess)))
            inv.hess <- try(solve(hess))
            if (class(inv.hess) == "try-error") {
                warning("Hessian matrix is singular!")
                inv.hess <- matrix(NA, ncol(hess), ncol(hess), 
                  dimnames = dimnames(hess))
            }
            names(par.ses) <- names(par.ests)
            dimnames(hess) <- list(names(par.ests), names(par.ests))
        }
        else {
            par.ses <- NA
            hess <- NA
            inv.hess <- NA
        }
    }
    list(convergence = convergence, par.ests = vars, parameter.variance = inv.hess, 
        ll.max = ll.max, n.iter = n.iter, message = message, 
        trace.pars = trace.pars)
}
<bytecode: 0x6bc2858>
<environment: namespace:ghyp>
 --- function search by body ---
Function .mle.default in namespace ghyp has this body.
 ----------- END OF FAILURE REPORT -------------- 

Error: processing vignette 'Generalized_Hyperbolic_Distribution.Rnw' failed with diagnostics:
 chunk 7 
Error in if (class(inv.hess) == "try-error") { : 
  the condition has length > 1

--- failed re-building 'Generalized_Hyperbolic_Distribution.Rnw'

SUMMARY: processing the following file failed:
  'Generalized_Hyperbolic_Distribution.Rnw'

Error: Vignette re-building failed.
Execution halted