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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: boot.matrix
> ### Title: Bootstraps and rarefies data.
> ### Aliases: boot.matrix
> 
> ### ** Examples
> 
> ## Load the Beck & Lee 2014 matrix
> data(BeckLee_mat50)
> 
> ## Bootstrapping a matrix
> ## Bootstrapping an ordinated matrix 20 times
> boot.matrix(BeckLee_mat50, bootstraps = 20)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
dispRity
 --- call from context --- 
boot.matrix(BeckLee_mat50, bootstraps = 20)
 --- call from argument --- 
if (class(data) != "dispRity") {
    check.class(data, "matrix")
    if (check.dist.matrix(data, just.check = TRUE)) {
        warning("boot.matrix is applied on what seems to be a distance matrix.\nThe resulting matrices won't be distance matrices anymore!", 
            call. = FALSE)
    }
    dispRity_object <- make.dispRity(data = data)
    data <- dispRity_object
} else {
    check.length(data, 3, " must be either a matrix or an output from the chrono.subsets or custom.subsets functions.")
    data_names <- names(data)
    if (is.null(data_names)) {
        stop.call(match_call$data, " must be either a matrix or an output from the chrono.subsets or custom.subsets functions.")
    }
    else {
        if (data_names[[1]] != "matrix" | data_names[[2]] != 
            "call" | data_names[[3]] != "subsets") {
            stop.call(match_call$data, "must be either a matrix or an output from the chrono.subsets or custom.subsets functions.")
        }
    }
    if (length(data$subsets) > 1) {
        elements_check <- unlist(lapply(unlist(data$subsets, 
            recursive = FALSE), function(X) length(X) < 3))
        if (any(elements_check)) {
            warning(paste("The following subsets have less than 3 elements: ", 
                paste(unlist(strsplit(names(elements_check)[which(elements_check)], 
                  split = ".elements")), collapse = ", "), ".\nThis might effect the bootstrap/rarefaction output.", 
                sep = ""))
        }
    }
}
 --- R stacktrace ---
where 1: boot.matrix(BeckLee_mat50, bootstraps = 20)

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (data, bootstraps = 100, rarefaction = FALSE, dimensions, 
    verbose = FALSE, boot.type = "full", prob) 
{
    parallel <- FALSE
    match_call <- match.call()
    if (class(data) != "dispRity") {
        check.class(data, "matrix")
        if (check.dist.matrix(data, just.check = TRUE)) {
            warning("boot.matrix is applied on what seems to be a distance matrix.\nThe resulting matrices won't be distance matrices anymore!", 
                call. = FALSE)
        }
        dispRity_object <- make.dispRity(data = data)
        data <- dispRity_object
    }
    else {
        check.length(data, 3, " must be either a matrix or an output from the chrono.subsets or custom.subsets functions.")
        data_names <- names(data)
        if (is.null(data_names)) {
            stop.call(match_call$data, " must be either a matrix or an output from the chrono.subsets or custom.subsets functions.")
        }
        else {
            if (data_names[[1]] != "matrix" | data_names[[2]] != 
                "call" | data_names[[3]] != "subsets") {
                stop.call(match_call$data, "must be either a matrix or an output from the chrono.subsets or custom.subsets functions.")
            }
        }
        if (length(data$subsets) > 1) {
            elements_check <- unlist(lapply(unlist(data$subsets, 
                recursive = FALSE), function(X) length(X) < 3))
            if (any(elements_check)) {
                warning(paste("The following subsets have less than 3 elements: ", 
                  paste(unlist(strsplit(names(elements_check)[which(elements_check)], 
                    split = ".elements")), collapse = ", "), 
                  ".\nThis might effect the bootstrap/rarefaction output.", 
                  sep = ""))
            }
        }
    }
    if (length(data$subsets) == 0) {
        data <- fill.dispRity(data)
        probabilistic_subsets <- FALSE
        has_multiple_trees <- FALSE
    }
    else {
        if (ifelse(all(unique(unlist(lapply(data$subsets, lapply, 
            ncol))) > 1), TRUE, FALSE)) {
            has_multiple_trees <- ifelse(class(unlist(data$subsets)) == 
                "integer", TRUE, FALSE)
            probabilistic_subsets <- FALSE
            if (!has_multiple_trees) {
                has_multiple_trees <- ifelse(all(unique(unlist(lapply(data$subsets, 
                  lapply, ncol))) == 3), FALSE, TRUE)
                probabilistic_subsets <- TRUE
            }
        }
        else {
            has_multiple_trees <- FALSE
            probabilistic_subsets <- FALSE
        }
    }
    if (!missing(prob)) {
        if (probabilistic_subsets || has_multiple_trees) {
            stop.call(match_call$data, paste0(" was generated using a gradual time-slicing or using multiple trees (", 
                data$call$subsets[2], ").\nThe prob option is not yet implemented for this case."))
        }
        else {
            probabilistic_subsets <- TRUE
            class_prob <- check.class(prob, c("matrix", "numeric"))
            prob_names <- attributes(prob)
            if (is.null(prob_names)) {
                stop.call("", "prob argument must have names (vector) or dimnames (matrix) attributes.")
            }
            else {
                if (is.null(prob_names$names)) {
                  prob_names <- prob_names$dimnames[[1]]
                }
                else {
                  prob_names <- names(prob)
                }
            }
            if (class_prob == "matrix") {
                prob <- as.vector(prob)
                if (length(prob) != length(prob_names)) {
                  stop.call("", "prob argument must be a matrix with one column only.")
                }
                else {
                  names(prob) <- prob_names
                }
            }
            if (!all(prob_names %in% rownames(data$matrix))) {
                stop.call(msg.pre = "prob argument contains elements not present in ", 
                  call = match_call$data, msg = ".")
            }
            else {
                missing_rows <- rownames(data$matrix) %in% prob_names
                if (any(missing_rows)) {
                  extra_prob <- rep(1, length(which(!missing_rows)))
                  names(extra_prob) <- rownames(data$matrix)[!missing_rows]
                  prob <- c(extra_prob, prob)
                }
            }
            if (any(prob < 0)) {
                stop.call("", "Probabilities given to prob argument must be positive.")
            }
            if (any(prob > 1)) {
                prob <- prob/max(prob)
            }
            names(prob) <- match(names(prob), rownames(data$matrix))
            add.prob <- function(one_subset, prob) {
                col1 <- one_subset$elements
                col2 <- rep(NA, nrow(one_subset$elements))
                col3 <- prob[match(one_subset$elements[, 1], 
                  names(prob))]
                attributes(col1) <- NULL
                attributes(col3) <- NULL
                one_subset$elements <- cbind(col1, col2, col3)
                return(one_subset)
            }
            data$subsets <- lapply(data$subsets, add.prob, prob)
        }
    }
    check.class(bootstraps, c("numeric", "integer"), " must be a single (integer) numerical value.")
    check.length(bootstraps, 1, " must be a single (integer) numerical value.")
    bootstraps <- round(abs(bootstraps))
    if (class(rarefaction) != "logical") {
        rare_class <- check.class(rarefaction, c("numeric", "integer", 
            "character"), " must be either numeric, logical or \"min\".")
        if (rare_class == "character") {
            if (rarefaction != "min") {
                stop("rarefaction argument must be either numeric, logical or \"min\".", 
                  call. = FALSE)
            }
            rare_out <- min(size.subsets(data))
            rarefaction <- rare_out <- ifelse(rare_out < 3, 3, 
                rare_out)
        }
        else {
            rare_out <- rarefaction
        }
    }
    else {
        if (rarefaction) {
            rarefaction <- seq(from = nrow(data$matrix), to = 3)
            rare_out <- "full"
        }
        else {
            rarefaction <- NULL
            rare_out <- NULL
        }
    }
    check.class(verbose, "logical")
    check.class(boot.type, "character")
    boot.type <- tolower(boot.type)
    check.length(boot.type, 1, " must be a single character string")
    check.method(boot.type, c("full", "single"), "boot.type")
    if (boot.type == "single" && has_multiple_trees) {
        boot.type <- "full"
        warning(paste0("Multiple trees where used in ", as.expression(match_call$data), 
            ". The 'boot.type' option is set to \"full\"."))
    }
    switch(boot.type, full = {
        if (probabilistic_subsets) {
            boot.type.fun <- boot.full.proba
        } else {
            boot.type.fun <- boot.full
        }
    }, single = {
        if (probabilistic_subsets) {
            boot.type.fun <- boot.single.proba
        } else {
            boot.type.fun <- boot.single
        }
    })
    if (!missing(dimensions)) {
        check.class(dimensions, "numeric", " must be a proportional threshold value.")
        check.length(dimensions, 1, " must be a proportional threshold value.", 
            errorif = FALSE)
        if (dimensions < 0) {
            stop.call("", "Number of dimensions to remove cannot be less than 0.")
        }
        if (dimensions < 1) 
            dimensions <- round(dimensions * ncol(data$matrix))
        if (dimensions > ncol(data$matrix)) {
            stop.call("", "Number of dimensions to remove cannot be more than the number of columns in the matrix.")
        }
        data$call$dimensions <- dimensions
    }
    else {
        data$call$dimensions <- ncol(data$matrix)
    }
    if (bootstraps == 0) {
        return(data)
    }
    if (verbose) 
        message("Bootstrapping", appendLF = FALSE)
    bootstrap_results <- lapply(data$subsets, bootstrap.wrapper, 
        bootstraps, rarefaction, boot.type.fun, verbose)
    if (verbose) 
        message("Done.", appendLF = FALSE)
    data$subsets <- mapply(combine.bootstraps, bootstrap_results, 
        data$subsets, SIMPLIFY = FALSE)
    data$call$bootstrap <- c(bootstraps, boot.type, list(rare_out))
    return(data)
}
<bytecode: 0xa4064c8>
<environment: namespace:dispRity>
 --- function search by body ---
Function boot.matrix in namespace dispRity has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1