Error(s) in re-building vignettes:
  ...
--- re-building ‘ginhoux.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
SCORPIUS
 --- call from context --- 
knn(dist, k, self_loops = self_loops)
 --- call from argument --- 
if (class(dist) == "dist") dist <- as.matrix(dist)
 --- R stacktrace ---
where 1: knn(dist, k, self_loops = self_loops)
where 2: knn_distances(as.matrix(dist_to_pts), 10, self_loops = TRUE)
where 3: rowMeans(knn_distances(as.matrix(dist_to_pts), 10, self_loops = TRUE))
where 4: infer_initial_trajectory(space, k)
where 5: infer_trajectory(space)
where 6: eval(expr, envir, enclos)
where 7: eval(expr, envir, enclos)
where 8: withVisible(eval(expr, envir, enclos))
where 9: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 10: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 11: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 12: 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 13: evaluate::evaluate(...)
where 14: 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 15: 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 16: block_exec(params)
where 17: call_block(x)
where 18: process_group.block(group)
where 19: process_group(group)
where 20: 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 21: process_file(text, output)
where 22: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 23: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 24: vweave_rmarkdown(...)
where 25: engine$weave(file, quiet = quiet, encoding = enc)
where 26: doTryCatch(return(expr), name, parentenv, handler)
where 27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 28: tryCatchList(expr, classes, parentenv, handlers)
where 29: 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)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 30: tools:::.buildOneVignette("ginhoux.Rmd", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/SCORPIUS.Rcheck/vign_test/SCORPIUS", 
    TRUE, FALSE, "ginhoux", "UTF-8", "/home/hornik/tmp/scratch/Rtmpgkll5f/filebcd4ee915c2.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (dist, k, self_loops = FALSE) 
{
    if (class(dist) == "dist") 
        dist <- as.matrix(dist)
    check_numeric_matrix(dist, "dist", finite = TRUE)
    if (nrow(dist) < 2) 
        stop(sQuote("dist"), " needs to consist of at least 2 rows")
    check_numeric_vector(k, "k", finite = TRUE, whole = TRUE, 
        range = c(1, nrow(dist) - 1), length = 1)
    check_logical_vector(self_loops, "self_loops", length = 1)
    indices <- knndist <- matrix(NA, nrow = nrow(dist), ncol = k, 
        dimnames = list(rownames(dist), if (k == 0) c() else paste0("knn", 
            seq_len(k))))
    row_ix <- if (!is.null(rownames(dist))) 
        rownames(dist)
    else seq_len(nrow(dist))
    col_ix <- if (!is.null(colnames(dist))) 
        colnames(dist)
    else seq_len(ncol(dist))
    if (self_loops) {
        for (i in row_ix) {
            indices[i, ] <- utils::head(order(dist[i, ]), k)
            knndist[i, ] <- dist[i, indices[i, ]]
        }
    }
    else {
        diag(dist) <- 0
        for (i in row_ix) {
            indices[i, ] <- head(order(dist[i, ]), k + 1)[-1]
            knndist[i, ] <- dist[i, indices[i, ]]
        }
    }
    list(indices = indices, distances = knndist)
}
<bytecode: 0x562ffbd4d580>
<environment: namespace:SCORPIUS>
 --- function search by body ---
Function knn in namespace SCORPIUS has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
--- re-building ‘simulated-data.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
SCORPIUS
 --- call from context --- 
knn(dist, k, self_loops = self_loops)
 --- call from argument --- 
if (class(dist) == "dist") dist <- as.matrix(dist)
 --- R stacktrace ---
where 1: knn(dist, k, self_loops = self_loops)
where 2: knn_distances(as.matrix(dist_to_pts), 10, self_loops = TRUE)
where 3: rowMeans(knn_distances(as.matrix(dist_to_pts), 10, self_loops = TRUE))
where 4: infer_initial_trajectory(space, k)
where 5: infer_trajectory(space)
where 6: eval(expr, envir, enclos)
where 7: eval(expr, envir, enclos)
where 8: withVisible(eval(expr, envir, enclos))
where 9: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 10: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 11: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 12: 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 13: evaluate::evaluate(...)
where 14: 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 15: 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 16: block_exec(params)
where 17: call_block(x)
where 18: process_group.block(group)
where 19: process_group(group)
where 20: 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 21: process_file(text, output)
where 22: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 23: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 24: vweave_rmarkdown(...)
where 25: engine$weave(file, quiet = quiet, encoding = enc)
where 26: doTryCatch(return(expr), name, parentenv, handler)
where 27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 28: tryCatchList(expr, classes, parentenv, handlers)
where 29: 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)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 30: tools:::.buildOneVignette("simulated-data.Rmd", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/SCORPIUS.Rcheck/vign_test/SCORPIUS", 
    TRUE, FALSE, "simulated-data", "UTF-8", "/home/hornik/tmp/scratch/Rtmpgkll5f/filebcd27e7569e.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (dist, k, self_loops = FALSE) 
{
    if (class(dist) == "dist") 
        dist <- as.matrix(dist)
    check_numeric_matrix(dist, "dist", finite = TRUE)
    if (nrow(dist) < 2) 
        stop(sQuote("dist"), " needs to consist of at least 2 rows")
    check_numeric_vector(k, "k", finite = TRUE, whole = TRUE, 
        range = c(1, nrow(dist) - 1), length = 1)
    check_logical_vector(self_loops, "self_loops", length = 1)
    indices <- knndist <- matrix(NA, nrow = nrow(dist), ncol = k, 
        dimnames = list(rownames(dist), if (k == 0) c() else paste0("knn", 
            seq_len(k))))
    row_ix <- if (!is.null(rownames(dist))) 
        rownames(dist)
    else seq_len(nrow(dist))
    col_ix <- if (!is.null(colnames(dist))) 
        colnames(dist)
    else seq_len(ncol(dist))
    if (self_loops) {
        for (i in row_ix) {
            indices[i, ] <- utils::head(order(dist[i, ]), k)
            knndist[i, ] <- dist[i, indices[i, ]]
        }
    }
    else {
        diag(dist) <- 0
        for (i in row_ix) {
            indices[i, ] <- head(order(dist[i, ]), k + 1)[-1]
            knndist[i, ] <- dist[i, indices[i, ]]
        }
    }
    list(indices = indices, distances = knndist)
}
<bytecode: 0x55f3017c6720>
<environment: namespace:SCORPIUS>
 --- function search by body ---
Function knn in namespace SCORPIUS has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
SUMMARY: processing the following files failed:
  ‘ginhoux.Rmd’ ‘simulated-data.Rmd’

Error: Vignette re-building failed.
Execution halted