Error(s) in re-building vignettes:
  ...
--- re-building 'cutpointr.Rmd' using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
cutpointr
 --- call from context --- 
sanitize_metric(m, m_name = metric_name, n = nrow(roccurve))
 --- call from argument --- 
if (dim(m)[2] == 1 & class(m) == "matrix") {
    res <- m
    if (is.null(colnames(res))) 
        colnames(res) <- m_name
} else {
    stop(paste("The metric function should return a numeric vector", 
        "or a one-column matrix or data.frame."))
}
 --- R stacktrace ---
where 1: sanitize_metric(m, m_name = metric_name, n = nrow(roccurve))
where 2: optimize_metric(data = data, x = x, class = class, metric_func = metric_func, 
    pos_class = pos_class, neg_class = neg_class, minmax = "max", 
    direction = direction, metric_name = metric_name, tol_metric = tol_metric, 
    use_midpoints = use_midpoints, ...)
where 3: method(data = dat$data[[1]], x = predictor, class = outcome, 
    metric_func = metric, direction = direction, pos_class = pos_class, 
    neg_class = neg_class, tol_metric = tol_metric, use_midpoints = use_midpoints, 
    ...)
where 4: cutpointr_internal(x, class, subgroup, method, metric, pos_class, 
    neg_class, direction, boot_runs, boot_stratify, use_midpoints, 
    break_ties, na.rm, allowParallel, predictor, outcome, mod_name, 
    subgroup_var, tol_metric, ...)
where 5: cutpointr.default(suicide, dsi, suicide, method = maximize_metric, 
    metric = sum_sens_spec)
where 6: cutpointr(suicide, dsi, suicide, method = maximize_metric, metric = sum_sens_spec)
where 7: eval(expr, envir, enclos)
where 8: eval(expr, envir, enclos)
where 9: withVisible(eval(expr, envir, enclos))
where 10: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 11: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 12: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 13: 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 14: evaluate::evaluate(...)
where 15: 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 16: 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 17: block_exec(params)
where 18: call_block(x)
where 19: process_group.block(group)
where 20: process_group(group)
where 21: 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 22: process_file(text, output)
where 23: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
where 24: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 25: vweave_rmarkdown(...)
where 26: engine$weave(file, quiet = quiet, encoding = enc)
where 27: doTryCatch(return(expr), name, parentenv, handler)
where 28: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 29: tryCatchList(expr, classes, parentenv, handlers)
where 30: 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 31: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/cutpointr.Rcheck/vign_test/cutpointr", 
    ser_elibs = "/tmp/Rtmpr6dL9x/file54203226293.rds")

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (m, m_name, n, silent = TRUE) 
{
    if ("data.frame" %in% class(m)) {
        m <- as.matrix(m)
    }
    if (!is.null(dim(m))) {
        if (dim(m)[2] == 1 & class(m) == "matrix") {
            res <- m
            if (is.null(colnames(res))) 
                colnames(res) <- m_name
        }
        else {
            stop(paste("The metric function should return a numeric vector", 
                "or a one-column matrix or data.frame."))
        }
    }
    else if (is.numeric(m)) {
        res <- matrix(m, ncol = 1, dimnames = list(NULL, m_name))
    }
    else {
        stop(paste("Can't process metric of type", class(m)))
    }
    finite_res <- is.finite(res)
    if (any(!finite_res)) {
        if (!silent) 
            message("Converting non-finite metric values to NA")
        res[!finite_res] <- NA
    }
    if (nrow(res) != n) {
        stop("Number of returned metric values not equal to n")
    }
    colnames(res) <- make.names(colnames(res))
    return(res)
}
<bytecode: 0x1a5e5f0>
<environment: namespace:cutpointr>
 --- function search by body ---
Function sanitize_metric in namespace cutpointr has this body.
 ----------- END OF FAILURE REPORT -------------- 
Quitting from lines 37-43 (cutpointr.Rmd) 
Error: processing vignette 'cutpointr.Rmd' failed with diagnostics:
the condition has length > 1
--- failed re-building 'cutpointr.Rmd'

SUMMARY: processing the following file failed:
  'cutpointr.Rmd'

Error: Vignette re-building failed.
Execution halted