Error(s) in re-building vignettes:
  ...
--- re-building 'my-vignette.Rmd' using rmarkdown
Loading required package: Matrix
Loaded glmnet 3.0-1

 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
TANDEM
 --- call from context --- 
tandem(x, y, upstream, alpha = 0.5)
 --- call from argument --- 
if (class(x) != "matrix" | !class(x[1, 1]) %in% c("numeric", 
    "integer")) stop("x needs to be a numeric matrix")
 --- R stacktrace ---
where 1: tandem(x, y, upstream, alpha = 0.5)
where 2: eval(expr, envir, enclos)
where 3: eval(expr, envir, enclos)
where 4: withVisible(eval(expr, envir, enclos))
where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 8: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, 
    debug = debug, last = i == length(out), use_try = stop_on_error != 
        2L, keep_warning = keep_warning, keep_message = keep_message, 
    output_handler = output_handler, include_timing = include_timing)
where 9: evaluate::evaluate(...)
where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), 
    keep_message = !isFALSE(options$message), stop_on_error = if (options$error && 
        options$include) 0L else 2L, output_handler = knit_handlers(options$render, 
        options))
where 11: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, 
    keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), 
    stop_on_error = if (options$error && options$include) 0L else 2L, 
    output_handler = knit_handlers(options$render, options)))
where 12: block_exec(params)
where 13: call_block(x)
where 14: process_group.block(group)
where 15: process_group(group)
where 16: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
    error = function(e) {
        setwd(wd)
        cat(res, sep = "\n", file = output %n% "")
        message("Quitting from lines ", paste(current_lines(i), 
            collapse = "-"), " (", knit_concord$get("infile"), 
            ") ")
    })
where 17: process_file(text, output)
where 18: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 20: vweave_rmarkdown(...)
where 21: engine$weave(file, quiet = quiet, encoding = enc)
where 22: doTryCatch(return(expr), name, parentenv, handler)
where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 24: tryCatchList(expr, classes, parentenv, handlers)
where 25: 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 26: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/TANDEM.Rcheck/vign_test/TANDEM", 
    ser_elibs = "/tmp/RtmppXkB4c/file192325fff72.rds")

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (x, y, upstream, family = "gaussian", nfolds = 10, foldid = NULL, 
    lambda_upstream = "lambda.1se", lambda_downstream = "lambda.1se", 
    ...) 
{
    if (class(x) != "matrix" | !class(x[1, 1]) %in% c("numeric", 
        "integer")) 
        stop("x needs to be a numeric matrix")
    if (!class(y) %in% c("numeric", "integer")) 
        stop("y needs to be a numeric vector")
    if (class(upstream) != "logical") 
        stop("upstream needs to a logical index vector, integer index vectors are currently not supported")
    if (nrow(x) != length(y)) 
        stop("Number of samples in x and y don't match")
    if (ncol(x) != length(upstream)) 
        stop("Number of features in x and upstream don't match")
    if (family != "gaussian") 
        stop("Currently only the glmnet family='guassian' is supported")
    if (any(is.na(x))) 
        stop("NAs in x are not allowed")
    if (any(is.na(y))) 
        stop("NAs in y are not allowed")
    if (nrow(x) < nfolds) 
        stop("nfolds should be smaller than the number of samples")
    if (!lambda_upstream %in% c("lambda.1se", "lambda.min")) 
        stop("lambda_upstream should be either lambda.1se or lambda.min")
    if (!lambda_downstream %in% c("lambda.1se", "lambda.min")) 
        stop("lambda_downstream should be either lambda.1se or lambda.min")
    if (is.null(foldid)) {
        n = length(y)
        foldid = ceiling(sample(1:n)/n * nfolds)
    }
    fit1 = glmnet::cv.glmnet(x[, upstream], y, foldid = foldid, 
        ...)
    residuals = y - glmnet::predict.cv.glmnet(fit1, newx = x[, 
        upstream], s = lambda_upstream)
    fit2 = glmnet::cv.glmnet(x[, !upstream], residuals, foldid = foldid, 
        ...)
    beta0 = glmnet::coef.cv.glmnet(fit1, s = lambda_upstream)[1] + 
        glmnet::coef.cv.glmnet(fit2, s = lambda_downstream)[1]
    beta = matrix(NA, ncol(x), 1)
    beta[upstream, ] = as.matrix(glmnet::coef.cv.glmnet(fit1, 
        s = lambda_upstream)[-1, , drop = F])
    beta[!upstream, ] = as.matrix(glmnet::coef.cv.glmnet(fit2, 
        s = lambda_downstream)[-1, , drop = F])
    rownames(beta) = colnames(x)
    beta = Matrix::Matrix(beta)
    fit = list(beta0 = beta0, beta = beta)
    class(fit) = "tandem"
    return(fit)
}
<bytecode: 0xd872770>
<environment: namespace:TANDEM>
 --- function search by body ---
Function tandem in namespace TANDEM has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1