Running examples in ‘mnormt-Ex.R’ failed
The error most likely occurred in:

> ### Name: dmnorm
> ### Title: Multivariate normal distribution
> ### Aliases: dmnorm pmnorm rmnorm sadmvn
> ### Keywords: distribution multivariate
> 
> ### ** Examples
> 
> x <- seq(-2, 4, length=21)
> y <- cos(2*x) + 10
> z <- x + sin(3*y) 
> mu <- c(1,12,2)
> Sigma <- matrix(c(1,2,0,2,5,0.5,0,0.5,3), 3, 3)
> f <- dmnorm(cbind(x,y,z), mu, Sigma)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
mnormt
 --- call from context --- 
pd.solve(varcov, log.det = TRUE)
 --- call from argument --- 
if (class(u) == "try-error") {
    if (silent) 
        return(NULL)
    else stop("x appears to be not positive definite")
}
 --- R stacktrace ---
where 1: pd.solve(varcov, log.det = TRUE)
where 2: dmnorm(cbind(x, y, z), mu, Sigma)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x, silent = FALSE, log.det = FALSE) 
{
    if (is.null(x)) 
        return(NULL)
    if (any(is.na(x))) {
        if (silent) 
            return(NULL)
        else stop("NA's in x")
    }
    if (length(x) == 1) 
        x <- as.matrix(x)
    if (!is.matrix(x)) {
        if (silent) 
            return(NULL)
        else stop("x is not a matrix")
    }
    if (max(abs(x - t(x))) > .Machine$double.eps) {
        if (silent) 
            return(NULL)
        else stop("x appears to be not symmetric")
    }
    x <- (x + t(x))/2
    u <- try(chol(x, pivot = FALSE), silent = silent)
    if (class(u) == "try-error") {
        if (silent) 
            return(NULL)
        else stop("x appears to be not positive definite")
    }
    inv <- chol2inv(u)
    if (log.det) 
        attr(inv, "log.det") <- 2 * sum(log(diag(u)))
    dimnames(inv) <- rev(dimnames(x))
    return(inv)
}
<bytecode: 0x2b00f90>
<environment: namespace:mnormt>
 --- function search by body ---
Function pd.solve in namespace mnormt has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(u) == "try-error") { : the condition has length > 1
Calls: dmnorm -> pd.solve
Execution halted