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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: BANOVA.Normal
> ### Title: Estimation of BANOVA with a normally distributed dependent
> ###   variable
> ### Aliases: BANOVA.Normal predict.BANOVA.Normal print.BANOVA.Normal
> ###   summary.BANOVA.Normal
> 
> ### ** Examples
> 
> # Use the ipadstudy data set
> data(ipadstudy)
> # mean center covariates
> ipadstudy$age <- ipadstudy$age - mean(ipadstudy$age) 
> ipadstudy$owner <- ipadstudy$owner - mean(ipadstudy$owner)
> ipadstudy$gender <- ipadstudy$gender - mean(ipadstudy$gender)
> res <- BANOVA.Normal(attitude~1, ~owner + age + gender + selfbrand*conspic, ipadstudy,
+ ipadstudy$id, burnin = 1000, sample = 1000, thin = 1 )
Model initializing...
Warning in BANOVA.NormalNormal(l1_formula, l2_formula, data, id, l1_hyper = l1_hyper,  :
  Variables(levels <= 3) have been converted to factors
Warning in BANOVA.NormalNormal(l1_formula, l2_formula, data, id, l1_hyper = l1_hyper,  :
  Variables(levels <= 3) have been converted to factors
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
BANOVA
 --- call from context --- 
mean.center(Z[, numeric_index_in_Z])
 --- call from argument --- 
if (class(m) != "matrix") m <- as.matrix(m)
 --- R stacktrace ---
where 1: mean.center(Z[, numeric_index_in_Z])
where 2: design.matrix(l1_formula, l2_formula, data = data, id = id)
where 3: BANOVA.NormalNormal(l1_formula, l2_formula, data, id, l1_hyper = l1_hyper, 
    l2_hyper = l2_hyper, burnin = burnin, sample = sample, thin = thin, 
    adapt = adapt, conv_speedup = conv_speedup, jags = jags)
where 4: BANOVA.Normal(attitude ~ 1, ~owner + age + gender + selfbrand * 
    conspic, ipadstudy, ipadstudy$id, burnin = 1000, sample = 1000, 
    thin = 1)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (m) 
{
    if (class(m) != "matrix") 
        m <- as.matrix(m)
    for (i in 1:ncol(m)) m[, i] <- m[, i] - mean(m[, i])
    return(m)
}
<bytecode: 0x56174dd27e10>
<environment: namespace:BANOVA>
 --- function search by body ---
Function mean.center in namespace BANOVA has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1