Running examples in 'mvtboost-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: mvtb
> ### Title: Fitting a Multivariate Tree Boosting Model
> ### Aliases: mvtb mvtb.fit
> 
> ### ** Examples
> 
> data(wellbeing)
> Y <- wellbeing[,21:26]
> X <- wellbeing[,1:20]
> Ys <- scale(Y)
> cont.id <- unlist(lapply(X,is.numeric))
> Xs <- scale(X[,cont.id])
> 
> ## Fit the model
> res <- mvtb(Y=Ys,X=Xs)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
mvtboost
 --- call from context --- 
mvtb(Y = Ys, X = Xs)
 --- call from argument --- 
if (class(Y) != "matrix") {
    Y <- as.matrix(Y)
}
 --- R stacktrace ---
where 1: mvtb(Y = Ys, X = Xs)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (Y, X, n.trees = 100, shrinkage = 0.01, interaction.depth = 1, 
    distribution = "gaussian", train.fraction = 1, bag.fraction = 1, 
    cv.folds = 1, s = NULL, seednum = NULL, compress = FALSE, 
    save.cv = FALSE, iter.details = TRUE, verbose = FALSE, mc.cores = 1, 
    ...) 
{
    if (class(Y) != "matrix") {
        Y <- as.matrix(Y)
    }
    if (is.null(ncol(X))) {
        X <- as.matrix(X)
    }
    params <- c(as.list(environment()), list(...))
    if (!is.null(seednum)) {
        set.seed(seednum)
    }
    stopifnot(nrow(X) == nrow(Y))
    n <- nrow(X)
    k <- ncol(Y)
    p <- ncol(X)
    if (is.null(colnames(X))) {
        colnames(X) <- paste("X", 1:p, sep = "")
    }
    if (is.null(colnames(Y))) {
        colnames(Y) <- paste("Y", 1:k, sep = "")
    }
    xnames <- colnames(X)
    ynames <- colnames(Y)
    if (is.null(s)) {
        s <- sample(1:n, floor(n * train.fraction), replace = F)
    }
    if (any(is.na(Y))) {
        stop("NAs not allowed in outcome variables.")
    }
    if (shrinkage > 1 | shrinkage <= 0) {
        stop("shrinkage should be > 0, < 1")
    }
    if (train.fraction > 1 | train.fraction <= 0) {
        stop("train.fraction should be > 0, < 1")
    }
    if (bag.fraction > 1 | bag.fraction <= 0) {
        stop("bag.fraction should be > 0, < 1")
    }
    trainerr <- testerr <- vector(length = n.trees)
    if (cv.folds > 1) {
        ocv <- mvtbCV(Y = Y, X = X, cv.folds = cv.folds, s = s, 
            save.cv = save.cv, mc.cores = mc.cores, n.trees = n.trees, 
            shrinkage = shrinkage, interaction.depth = interaction.depth, 
            distribution = distribution, bag.fraction = bag.fraction, 
            verbose = verbose, seednum = seednum)
        best.iters.cv <- ocv$best.iters.cv
        cv.err <- ocv$cv.err
        out.fit <- ocv$models.k[[cv.folds + 1]]
    }
    else {
        out.fit <- mvtb.fit(Y = Y, X = X, n.trees = n.trees, 
            shrinkage = shrinkage, interaction.depth = interaction.depth, 
            distribution = distribution, bag.fraction = bag.fraction, 
            verbose = verbose, s = s, seednum = seednum, ...)
        best.iters.cv <- NULL
        cv.err <- NULL
        ocv <- NULL
    }
    models <- out.fit$models
    trainerr <- out.fit$trainerr
    testerr <- out.fit$testerr
    best.trees <- list(best.testerr = which.min(testerr), best.cv = best.iters.cv, 
        last = n.trees)
    if (!save.cv) {
        ocv <- NULL
    }
    if (iter.details == T) {
        fl <- list(models = models, best.trees = best.trees, 
            params = params, trainerr = trainerr, testerr = testerr, 
            cv.err = cv.err, ocv = ocv, s = s, n = nrow(X), xnames = colnames(X), 
            ynames = colnames(Y))
    }
    else {
        fl <- list(models = models, best.trees = best.trees, 
            params = params, s = s, ocv = ocv, n = nrow(X), xnames = colnames(X), 
            ynames = colnames(Y))
    }
    if (compress) {
        fl <- lapply(fl, comp)
    }
    class(fl) <- "mvtb"
    return(fl)
}
<bytecode: 0xc1ee2f0>
<environment: namespace:mvtboost>
 --- function search by body ---
Function mvtb in namespace mvtboost has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Y) != "matrix") { : the condition has length > 1
Calls: mvtb
Execution halted