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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: collectors.curve
> ### Title: collectors.curve
> ### Aliases: collectors.curve
> 
> ### ** Examples
> 
> require("rtk")
> # Collectors Curve dataset should be broad and contain many samples (columns)
> data       <- matrix(sample(x = c(rep(0, 15000),rep(1:10, 100)),
+                      size = 10000, replace = TRUE), ncol = 80)
> data.r     <- rtk(data, ReturnMatrix = 1, depth = min(colSums(data)))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
rtk
 --- call from context --- 
rtk(data, ReturnMatrix = 1, depth = min(colSums(data)))
 --- call from argument --- 
if (class(input) == "data.frame") {
    input <- as.matrix(input)
}
 --- R stacktrace ---
where 1: rtk(data, ReturnMatrix = 1, depth = min(colSums(data)))

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (input, repeats = 10, depth = 1000, ReturnMatrix = 0, 
    margin = 2, verbose = FALSE, threads = 1, tmpdir = NULL) 
{
    removeCnames <- FALSE
    removeRnames <- FALSE
    if (repeats < ReturnMatrix) {
        repeats <- ReturnMatrix
        warning(paste("Repeats can not be smaller than number of matrices to return. Repeats set to match ReturnMatrix. repeats = ReturnMatrix =", 
            repeats, sep = " "))
    }
    depth <- sort(as.numeric(depth))
    if (class(input) == "data.frame") {
        input <- as.matrix(input)
    }
    if (class(input) == "matrix") {
        rare.status("Matrix object supplied for analysis", verbose)
        if (!is.numeric(input)) {
            stop("The supplied matrix object is not numeric. Please check your input matrix.")
        }
        if (any(is.na(input))) {
            stop("The input data contains NA values. Please sanitize your input first.")
        }
        if (is.null(colnames(input))) {
            colnames(input) <- paste("col ", seq(1:ncol(input)), 
                sep = "")
            removeCnames <- TRUE
        }
        if (is.null(rownames(input))) {
            rownames(input) <- paste("row ", seq(1:nrow(input)), 
                sep = "")
            removeRnames <- TRUE
        }
        result <- rcpp_rarefaction("", input, colnames(input), 
            rownames(input), repeats, depth, ReturnMatrix, verbose, 
            threads, margin, "NULL", FALSE)
        gc()
    }
    else if (class(input) == "character") {
        rare.status("A path to a matrix file was supplied", verbose)
        if (!is.null(tmpdir) & margin == 2) {
            uselowmem <- TRUE
            rare.status("Low memory mode will be used. Temporary files will be stored on storage medium", 
                verbose)
        }
        else if (!is.null(tmpdir) & margin != 2) {
            warning("Can not use low mem on margin = 1. Please consider transforming your input data, to use low memory (swap) mode.")
        }
        else {
            uselowmem <- FALSE
            tmpdir <- "NULL"
        }
        if (!file.exists(input)) {
            stop(paste("The file can not be found. Please verify that the file exists in the given location. The path given is:", 
                input, sep = " "))
        }
        result <- rcpp_rarefaction(input, matrix(1, 1, c(1)), 
            c(NA), c(NA), repeats, depth, ReturnMatrix, verbose, 
            threads, margin, tmpdir, uselowmem)
    }
    else {
        stop("Unknown input type. Path to a file (character) or a numeric matrix are accepted types.")
    }
    result <- lapply(result, function(res) {
        if (removeRnames == TRUE && removeCnames == TRUE) {
            res$raremat <- lapply(res$raremat, unname)
        }
        else {
            if (removeRnames == TRUE) {
                res$raremat <- lapply(res$raremat, function(x) {
                  rownames(x) <- NULL
                  return(x)
                })
            }
            if (removeCnames == TRUE) {
                res$raremat <- lapply(res$raremat, function(x) {
                  colnames(x) <- NULL
                  return(x)
                })
            }
        }
        if (length(res$skipped) > 0) {
            warning(paste(length(res$skipped), "samples where skipped because the depth was greater than the number of elements in the sample."))
        }
        measures <- c("richness", "shannon", "simpson", "invsimpson", 
            "chao1", "eveness")
        res$div.median <- lapply(measures, r.median, x = res$divvs)
        names(res$div.median) <- paste("median.", measures, sep = "")
        return(res)
    })
    if (length(depth) == 1) {
        result <- result[[1]]
    }
    else {
        names(result) <- depth
    }
    result$depths <- depth
    result$repeats <- repeats
    class(result) <- "rtk"
    gc()
    return(result)
}
<bytecode: 0x303e500>
<environment: namespace:rtk>
 --- function search by body ---
Function rtk in namespace rtk has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(input) == "data.frame") { : 
  the condition has length > 1
Calls: rtk
Execution halted