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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Rgbp
> ### Title: Hierarchical Modeling and Frequency Method Checking on
> ###   Overdispersed Gaussian, Poisson, and Binomial Data
> ### Aliases: Rgbp-package Rgbp
> ### Keywords: package
> 
> ### ** Examples
> 
> 
>   # Loading datasets
>   data(schools)
>   y <- schools$y
>   se <- schools$se
> 
>   # Arbitrary covariate for schools data
>   x2 <- rep(c(-1, 0, 1, 2), 2)
>   
>   # baseball data where z is Hits and n is AtBats
>   z <- c(18, 17, 16, 15, 14, 14, 13, 12, 11, 11, 10, 10, 10, 10, 10,  9,  8,  7)
>   n <- c(45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45)
> 
>   # One covariate: 1 if a player is an outfielder and 0 otherwise
>   x1 <- c(1,  1,  1,  1,  1,  0,  0,  0,  0,  1,  0,  0,  0,  1,  1,  0,  0,  0)
> 
>   ################################################################
>   # Gaussian Regression Interactive Multilevel Modeling (GRIMM) #
>   ################################################################
> 
>     ####################################################################################
>     # If we do not have any covariate and do not know a mean of the prior distribution #
>     ####################################################################################
> 
>     g <- gbp(y, se, model = "gaussian")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
Rgbp
 --- call from context --- 
gr.ll.muunknown(exp(x[1]), y, V, X, type)
 --- call from argument --- 
if (class(BetaA) == "try-error") lla <- -10^6 else lla <- type * 
    log(A) + sum(dnorm(x = y, mean = X %*% BetaA, sd = sqrt(V + 
    A), log = TRUE)) - 1/2 * log(det(exp1))
 --- R stacktrace ---
where 1: gr.ll.muunknown(exp(x[1]), y, V, X, type)
where 2: fn(par, ...)
where 3: (function (par) 
fn(par, ...))(4.9922989975398)
where 4: optim(mean(log(V)), function(x) {
    gr.ll.muunknown(exp(x[1]), y, V, X, type)
}, control = list(fnscale = -1, maxit = 1000), method = "BFGS", 
    hessian = T, gr = function(x) {
        derval(x, y, V, X)
    })
where 5: gr(y, se.or.n, X = covariates, mu = mean.PriorDist, confidence.lvl = confidence.lvl, 
    intercept = intercept, normal.CI = normal.CI)
where 6: gbp(y, se, model = "gaussian")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (A, y, V, X, type) 
{
    DVAi <- diag(1/(V + A))
    exp1 <- t(X) %*% DVAi %*% X
    BetaA <- try(chol2inv(chol(exp1)) %*% t(X) %*% DVAi %*% y, 
        silent = TRUE)
    if (class(BetaA) == "try-error") 
        lla <- -10^6
    else lla <- type * log(A) + sum(dnorm(x = y, mean = X %*% 
        BetaA, sd = sqrt(V + A), log = TRUE)) - 1/2 * log(det(exp1))
    return(lla)
}
<bytecode: 0x559b8e8ce600>
<environment: namespace:Rgbp>
 --- function search by body ---
Function gr.ll.muunknown in namespace Rgbp has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1