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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: clere-package
> ### Title: CLERE methodology for simultaneous variables clustering and
> ###   regression
> ### Aliases: clere clere-package
> ### Keywords: clere-package Clere clere package
> 
> ### ** Examples
>  
>  # Simple example using simulated data
>  # to see how to you the main function clere
>  # library(clere)
>  x     <- matrix(rnorm(50 * 100), nrow = 50, ncol = 100)
>  y     <- rnorm(50)
>  model <- fitClere(y = y, x = x, g = 2, plotit = FALSE)
>  plot(model) 
>  clus <- clusters(model, threshold = NULL)
>  predict(model, newx = x+1)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
clere
 --- call from context --- 
.local(object, ...)
 --- call from argument --- 
if (class(newx) == "matrix") {
    if (ncol(newx) == object@p) {
        return(object@intercept + rowMeans(newx %*% object@Bw, 
            na.rm = TRUE))
    }
    else {
        stop(paste0("[Clere:predict] \"newx\" must be a matrix with ", 
            object@p, " columns"), call. = FALSE)
    }
} else {
    stop("[Clere:predict] \"newx\" is not a matrix", call. = FALSE)
}
 --- R stacktrace ---
where 1: .local(object, ...)
where 2: predict(model, newx = x + 1)
where 3: predict(model, newx = x + 1)

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (object, newx, ...) 
{
    if (class(newx) == "matrix") {
        if (ncol(newx) == object@p) {
            return(object@intercept + rowMeans(newx %*% object@Bw, 
                na.rm = TRUE))
        }
        else {
            stop(paste0("[Clere:predict] \"newx\" must be a matrix with ", 
                object@p, " columns"), call. = FALSE)
        }
    }
    else {
        stop("[Clere:predict] \"newx\" is not a matrix", call. = FALSE)
    }
}
<environment: namespace:clere>
 --- function search by body ---
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(newx) == "matrix") { : the condition has length > 1
Calls: predict -> predict -> .local
Execution halted