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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ns
> ### Title: Nested Stacking for multi-label Classification
> ### Aliases: ns
> 
> ### ** Examples
> 
> model <- ns(toyml, "RANDOM")
> pred <- predict(model, toyml)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
utiml
 --- call from context --- 
subset_correction(utiml_predict(predictions[object$labels], probability), 
    object$labelsets, probability)
 --- call from argument --- 
if (class(train_y) == "mldr") {
    train_y <- train_y$dataset[train_y$labels$index]
}
 --- R stacktrace ---
where 1: subset_correction(utiml_predict(predictions[object$labels], probability), 
    object$labelsets, probability)
where 2: predict.NSmodel(model, toyml)
where 3: predict(model, toyml)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (mlresult, train_y, probability = FALSE) 
{
    bip <- as.bipartition(mlresult)
    prob <- as.probability(mlresult)
    if (class(train_y) == "mldr") {
        train_y <- train_y$dataset[train_y$labels$index]
    }
    if (ncol(mlresult) != ncol(train_y)) {
        stop("The number of columns in the predicted result are different from the\n         training data")
    }
    labelsets <- as.matrix(unique(train_y))
    rownames(labelsets) <- apply(labelsets, 1, paste, collapse = "")
    order <- names(sort(table(apply(train_y, 1, paste, collapse = "")), 
        decreasing = TRUE))
    labelsets <- labelsets[order, ]
    new.pred <- t(apply(bip, 1, function(y) {
        labelsets[names(which.min(apply(labelsets, 1, function(row) {
            sum(row != y)
        }))), ]
    }))
    multilabel_prediction(new.pred, prob, probability)
}
<bytecode: 0x7e08590>
<environment: namespace:utiml>
 --- function search by body ---
Function subset_correction in namespace utiml has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1