Running examples in 'SCORPIUS-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: SCORPIUS-package
> ### Title: SCORPIUS: Trajectory inference from single-cell RNA sequencing
> ###   data.
> ### Aliases: SCORPIUS-package SCORPIUS
> 
> ### ** Examples
> 
> ## Load dataset from Schlitzer et al., 2015
> data("ginhoux")
> 
> ## Reduce dimensionality and infer trajectory with SCORPIUS
> space <- reduce_dimensionality(ginhoux$expression, "spearman")
> traj <- infer_trajectory(space)
 ----------- 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)

 --- 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: 0x67851e8>
<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