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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: bn
> ### Title: Computes Bn Statistic.
> ### Aliases: bn
> 
> ### ** Examples
> 
> n=5
> x=matrix(rnorm(n*10),ncol=10)
> bn(c(1,0,0,0,0),data=x)     # option (a) entering the data matrix directly
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
uclust
 --- call from context --- 
bn(c(1, 0, 0, 0, 0), data = x)
 --- call from argument --- 
if (class(md) != "matrix") {
    stop("md is not of class matrix")
}
 --- R stacktrace ---
where 1: bn(c(1, 0, 0, 0, 0), data = x)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (group_id, md = NULL, data = NULL) 
{
    if (is.null(md)) {
        if (is.null(data)) {
            stop("No data provided")
        }
        md <- as.matrix(dist(data)^2)
    }
    if (class(md) != "matrix") {
        stop("md is not of class matrix")
    }
    group1 <- (group_id == 0)
    group2 <- group_id == 1
    ngv <- c(sum(group1), sum(group2))
    ng <- dim(md)[1]
    if (ng != sum(ngv)) {
        stop("Incorrect dimension or group_id")
    }
    if (min(ngv) > 1) {
        s11 <- sum(md[group1, group1])/2
        s22 <- sum(md[group2, group2])/2
        s12 <- sum(md[group1, group2])
        a1 <- (1/(ngv[1] * ngv[2])) * s12
        a2 <- (2/(ngv[1] * (ngv[1] - 1))) * s11
        a3 <- (2/(ngv[2] * (ngv[2] - 1))) * s22
        sBn <- (ngv[1] * ngv[2]/(ng * (ng - 1))) * (2 * a1 - 
            a2 - a3)
    }
    else {
        if (ngv[1] == 1) {
            s22 <- sum(md[group2, group2])/2
            s12 <- sum(md[group1, group2])
            a1 <- (1/(ngv[1] * ngv[2])) * s12
            a2 <- 0
            a3 <- (2/(ngv[2] * (ngv[2] - 1))) * s22
            sBn <- (ngv[1] * ngv[2]/(ng * (ng - 1))) * (a1 - 
                a2 - a3)
        }
        else {
            s11 <- sum(md[group1, group1])/2
            s12 <- sum(md[group1, group2])
            a1 <- (1/(ngv[1] * ngv[2])) * s12
            a2 <- (2/(ngv[1] * (ngv[1] - 1))) * s11
            a3 <- 0
            sBn <- (ngv[1] * ngv[2]/(ng * (ng - 1))) * (a1 - 
                a2 - a3)
        }
    }
    sBn
}
<bytecode: 0x55c31bb36730>
<environment: namespace:uclust>
 --- function search by body ---
Function bn in namespace uclust has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1