Running examples in ‘ClusterR-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: AP_affinity_propagation
> ### Title: Affinity propagation clustering
> ### Aliases: AP_affinity_propagation
> 
> ### ** Examples
> 
> 
> set.seed(1)
> dat = matrix(sample(1:255, 2500, replace = TRUE), 100, 25)
> 
> smt = 1.0 - distance_matrix(dat, method = 'euclidean', upper = TRUE, diagonal = TRUE)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
ClusterR
 --- call from context --- 
distance_matrix(dat, method = "euclidean", upper = TRUE, diagonal = TRUE)
 --- call from argument --- 
if (class(data) != "matrix") stop("data should be either a matrix or a data frame")
 --- R stacktrace ---
where 1: distance_matrix(dat, method = "euclidean", upper = TRUE, diagonal = TRUE)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (data, method = "euclidean", upper = FALSE, diagonal = FALSE, 
    minkowski_p = 1, threads = 1) 
{
    if ("data.frame" %in% class(data)) 
        data = as.matrix(data)
    if (class(data) != "matrix") 
        stop("data should be either a matrix or a data frame")
    if (!method %in% c("euclidean", "manhattan", "chebyshev", 
        "canberra", "braycurtis", "pearson_correlation", "simple_matching_coefficient", 
        "minkowski", "hamming", "jaccard_coefficient", "Rao_coefficient", 
        "mahalanobis", "cosine")) 
        stop("the method should be one of 'euclidean', 'manhattan', 'chebyshev', 'canberra', 'braycurtis', 'pearson_correlation', 'simple_matching_coefficient',\n         'minkowski', 'hamming', 'jaccard_coefficient', 'Rao_coefficient', 'mahalanobis', 'cosine'")
    if (!is.logical(upper)) 
        stop("the upper parameter should be either TRUE or FALSE")
    if (!is.logical(diagonal)) 
        stop("the diagonal parameter should be either TRUE or FALSE")
    if (method == "minkowski" && minkowski_p == 0) 
        stop("if distance metric is minkowski then the minkowski_p should be either a positive or a negative number but not 0.0")
    if (threads < 1) 
        stop("the number of threads should be greater than 1")
    res = dissim_mat(data, method, minkowski_p, upper, diagonal, 
        threads, 1e-06)
    return(res)
}
<bytecode: 0x563d616e49a8>
<environment: namespace:ClusterR>
 --- function search by body ---
Function distance_matrix in namespace ClusterR has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1