Error(s) in re-building vignettes:
  ...
--- re-building 'MetaSKAT.Rnw' using Sweave
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
MetaSKAT
 --- call from context --- 
Meta_SKAT_MAIN_Check_Z(Z, n, obj.res$id_include, SetID, impute.method = impute.method)
 --- call from argument --- 
if (class(Z) != "matrix") stop("Z is not a matrix")
 --- R stacktrace ---
where 1: Meta_SKAT_MAIN_Check_Z(Z, n, obj.res$id_include, SetID, impute.method = impute.method)
where 2: Meta_SKAT_SaveData(Z1, obj$out[[i]], SetID = NULL, impute.method = impute.method)
where 3: MetaSKAT_wZ(Z.list[[1]], obj)
where 4: eval(expr, .GlobalEnv)
where 5: eval(expr, .GlobalEnv)
where 6: withVisible(eval(expr, .GlobalEnv))
where 7: doTryCatch(return(expr), name, parentenv, handler)
where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 9: tryCatchList(expr, classes, parentenv, handlers)
where 10: 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 11: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 12: evalFunc(ce, options)
where 13: tryCatchList(expr, classes, parentenv, handlers)
where 14: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 15: driver$runcode(drobj, chunk, chunkopts)
where 16: utils::Sweave(...)
where 17: engine$weave(file, quiet = quiet, encoding = enc)
where 18: doTryCatch(return(expr), name, parentenv, handler)
where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 20: tryCatchList(expr, classes, parentenv, handlers)
where 21: 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 22: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/MetaSKAT.Rcheck/vign_test/MetaSKAT", 
    ser_elibs = "/tmp/RtmpHXg7NF/file149b37b56674.rds")

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (Z, n, id_include, SetID, is_dosage = FALSE, impute.method = "fixed") 
{
    m = ncol(Z)
    if (class(Z) != "matrix") 
        stop("Z is not a matrix")
    if (nrow(Z) != n) 
        stop("Dimensions of y and Z do not match")
    if (is_dosage == TRUE) {
        impute.method = "fixed"
    }
    IDX_MISS <- union(which(is.na(Z)), which(Z == 9))
    if (length(IDX_MISS) > 0) {
        Z[IDX_MISS] <- NA
    }
    missing.ratio <- rep(0, m)
    for (i in 1:m) {
        missing.ratio[i] <- length(which(is.na(Z[, i])))/n
        if (missing.ratio[i] > 0.9) {
            Z[, i] <- 0
        }
    }
    MAF <- colMeans(Z, na.rm = TRUE)/2
    IDX.Err <- which(MAF > 0.5)
    if (length(IDX.Err) > 0) {
        msg <- sprintf("Genotypes of some variants are not the number of minor alleles!")
    }
    Z <- SKAT:::Impute(Z, impute.method)
    Z <- cbind(Z)
    Z.test <- as.matrix(Z[id_include, ])
    return(list(Z.test = Z.test, missing_rate = missing.ratio, 
        MAF = MAF, return = 0))
}
<bytecode: 0x16a2548>
<environment: namespace:MetaSKAT>
 --- function search by body ---
Function Meta_SKAT_MAIN_Check_Z in namespace MetaSKAT has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1