Error(s) in re-building vignettes:
--- re-building ‘MiRKAT.Rnw’ using Sweave
This is vegan 2.5-6
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
MiRKAT
 --- call from context --- 
MiRKAT(y = Smoker, Ks = K.weighted, X = cbind(Male, anti), out_type = "D", 
    method = "davies")
 --- call from argument --- 
if (class(Ks) == "matrix") {
    Ks = list(Ks)
}
 --- R stacktrace ---
where 1: MiRKAT(y = Smoker, Ks = K.weighted, X = cbind(Male, anti), out_type = "D", 
    method = "davies")
where 2: eval(expr, .GlobalEnv)
where 3: eval(expr, .GlobalEnv)
where 4: withVisible(eval(expr, .GlobalEnv))
where 5: doTryCatch(return(expr), name, parentenv, handler)
where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 7: tryCatchList(expr, classes, parentenv, handlers)
where 8: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 10: evalFunc(ce, options)
where 11: tryCatchList(expr, classes, parentenv, handlers)
where 12: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 13: driver$runcode(drobj, chunk, chunkopts)
where 14: utils::Sweave(...)
where 15: engine$weave(file, quiet = quiet, encoding = enc)
where 16: doTryCatch(return(expr), name, parentenv, handler)
where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 18: tryCatchList(expr, classes, parentenv, handlers)
where 19: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
    outputs <- c(outputs, output)
}, error = function(e) {
    thisOK <<- FALSE
    fails <<- c(fails, file)
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 20: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-devel/MiRKAT.Rcheck/vign_test/MiRKAT", 
    ser_elibs = "/tmp/Rtmpai4ahY/file9e62501362e3.rds")

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (y, X = NULL, Ks, out_type = "C", nperm = 999, method = "davies") 
{
    n = length(y)
    if (any(is.na(y))) {
        ids = which(is.na(y))
        stop(paste("subjects", ids, "has missing response, please remove before proceed \n"))
    }
    if (is.null(X) == FALSE) {
        if (NROW(X) != length(y)) 
            stop("Dimensions of X and y don't match.")
    }
    if (class(Ks) == "matrix") {
        Ks = list(Ks)
    }
    if (class(Ks) == "list") {
        if ((any(lapply(Ks, "nrow") != n)) | (any(lapply(Ks, 
            "ncol") != n))) {
            stop("distance matrix need to be n x n, where n is the sample size \n ")
        }
        if (class(Ks) != "list") {
            stop("Distance needs to be a list of n x n matrices or a single n x n matrix \n")
        }
    }
    if (!is.null(X)) {
        if (any(is.na(X))) {
            stop("NAs in  covariates X, please impute or remove subjects which has missing covariates values")
        }
    }
    if (method == "moment" & n < 100 & out_type == "C") {
        warning("Continuous outcome: sample size < 100, p-value using moment matching can be inaccurate at tails, davies or permutation is recommended")
    }
    if (method == "moment" & n < 200 & out_type == "D") {
        warning("Continuous outcome: sample size < 200, p-value using moment matching can be inaccurate at tails, davies or permutation is recommended")
    }
    if (!(out_type %in% c("C", "D"))) {
        stop("Currently only continuous and Binary outcome are supported. Please choose out_type = \"C\" or \"D\" ")
    }
    if (out_type == "C") {
        re = MiRKAT_continuous(y, X = X, Ks = Ks, method = method, 
            nperm = nperm)
    }
    if (out_type == "D") {
        re = MiRKAT_binary(y, X = X, Ks = Ks, method = method, 
            nperm = nperm)
    }
    return(re)
}
<bytecode: 0x7f0f530>
<environment: namespace:MiRKAT>
 --- function search by body ---
Function MiRKAT in namespace MiRKAT has this body.
 ----------- END OF FAILURE REPORT -------------- 

Error: processing vignette 'MiRKAT.Rnw' failed with diagnostics:
 chunk 5 (label = data5) 
Error in if (class(Ks) == "matrix") { : the condition has length > 1

--- failed re-building ‘MiRKAT.Rnw’

SUMMARY: processing the following file failed:
  ‘MiRKAT.Rnw’

Error: Vignette re-building failed.
Execution halted