Error(s) in re-building vignettes:
  ...
--- re-building 'kantorovich.Rmd' using rmarkdown

Attaching package: 'gmp'

The following objects are masked from 'package:base':

    %*%, apply, crossprod, matrix, tcrossprod

 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
kantorovich
 --- call from context --- 
edistances(mu = mu, nu = nu, dist = dist, ...)
 --- call from argument --- 
if (class(dist) == "function") {
    rho <- function(x, y) dist(x, y, ...)
} else if (class(dist) == "matrix") {
    if (!use_gmp && mode(dist) != "numeric") 
        stop("The dist matrix must be numeric if mu and nu are numeric")
    if (nrow(dist) != length(mu) || ncol(dist) != length(nu)) 
        stop("Invalid dimension of the dist matrix")
    if (is.null(rownames(dist))) 
        rownames(dist) <- 1:nrow(dist)
    if (is.null(colnames(dist))) 
        colnames(dist) <- 1:ncol(dist)
    if (!setequal(rownames(j1), rownames(dist)) || !setequal(colnames(j1), 
        colnames(dist))) 
        stop("Invalid dimension names of the dist matrix")
} else {
    if (!use_gmp) 
        stop("dist must be a function or a numeric matrix")
    if (use_gmp) 
        stop("dist must be a function or a numeric/character matrix")
}
 --- R stacktrace ---
where 1: edistances(mu = mu, nu = nu, dist = dist, ...)
where 2: kantorovich(mu, nu, dist = M)
where 3: eval(expr, envir, enclos)
where 4: eval(expr, envir, enclos)
where 5: withVisible(eval(expr, envir, enclos))
where 6: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 7: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 8: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 9: 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 10: evaluate::evaluate(...)
where 11: 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: 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 13: block_exec(params)
where 14: call_block(x)
where 15: process_group.block(group)
where 16: process_group(group)
where 17: 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 18: process_file(text, output)
where 19: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
where 20: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 21: vweave_rmarkdown(...)
where 22: engine$weave(file, quiet = quiet, encoding = enc)
where 23: doTryCatch(return(expr), name, parentenv, handler)
where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 25: tryCatchList(expr, classes, parentenv, handlers)
where 26: 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 27: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/kantorovich.Rcheck/vign_test/kantorovich", 
    ser_elibs = "/tmp/RtmpokkmPi/file24d267949b86.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (mu, nu, dist = NULL, ...) 
{
    joinings <- ejoinings(mu, nu, zeros = TRUE)
    n.joinings <- length(joinings)
    j1 <- joinings[[1]]
    use_gmp <- class(mu) %in% c("bigq", "character")
    if (is.null(dist)) {
        rho <- function(x, y) discrete(x, y, gmp = use_gmp)
    }
    else if (class(dist) == "function") {
        rho <- function(x, y) dist(x, y, ...)
    }
    else if (class(dist) == "matrix") {
        if (!use_gmp && mode(dist) != "numeric") 
            stop("The dist matrix must be numeric if mu and nu are numeric")
        if (nrow(dist) != length(mu) || ncol(dist) != length(nu)) 
            stop("Invalid dimension of the dist matrix")
        if (is.null(rownames(dist))) 
            rownames(dist) <- 1:nrow(dist)
        if (is.null(colnames(dist))) 
            colnames(dist) <- 1:ncol(dist)
        if (!setequal(rownames(j1), rownames(dist)) || !setequal(colnames(j1), 
            colnames(dist))) 
            stop("Invalid dimension names of the dist matrix")
    }
    else {
        if (!use_gmp) 
            stop("dist must be a function or a numeric matrix")
        if (use_gmp) 
            stop("dist must be a function or a numeric/character matrix")
    }
    if (class(dist) == "matrix") {
        Rho <- dist[rownames(j1), colnames(j1)]
    }
    else {
        if (use_gmp) {
            Rho <- outer(rownames(j1), colnames(j1), FUN = Vectorize_bigq(rho))
        }
        else {
            Rho <- outer(rownames(j1), colnames(j1), FUN = rho)
        }
    }
    distances <- if (use_gmp) 
        gmp::as.bigq(numeric(n.joinings))
    else numeric(n.joinings)
    for (k in 1:n.joinings) {
        joining <- joinings[[k]]
        if (use_gmp) {
            distances[k] <- sum(Rho * as.bigq(joining))
        }
        else {
            distances[k] <- sum(Rho * joining)
        }
    }
    out <- list(joinings = joinings, distances = distances)
    return(out)
}
<bytecode: 0x318bbd0>
<environment: namespace:kantorovich>
 --- function search by body ---
Function edistances in namespace kantorovich has this body.
 ----------- END OF FAILURE REPORT -------------- 
Quitting from lines 75-84 (kantorovich.Rmd) 
Error: processing vignette 'kantorovich.Rmd' failed with diagnostics:
the condition has length > 1
--- failed re-building 'kantorovich.Rmd'

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

Error: Vignette re-building failed.
Execution halted