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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: TDDclust
> ### Title: Trimmed clustering based on L1 data depth
> ### Aliases: TDDclust
> ### Keywords: array
> 
> ### ** Examples
> 
> #In the interests of simplicity of the computation involved, only 15 points are selected:
> dataTDDcl <- sampleSpanishSurvey[1 : 15, c(2, 3, 5)]  
> dataTDDcl_aux <- sampleSpanishSurvey[1 : 15, c(2, 3, 5)]
> 
> numClust <- 3 ; alpha <- 0.01 ; lambda <- 0.5 ; niter <- 2
> Th <- 0 ; T0 <- 0 ; simAnn <- 0.9  
> 
> #For reproducing results, seed for randomness:
> #suppressWarnings(RNGversion("3.5.0"))
> #set.seed(2014)
> res_TDDcl <- TDDclust(dataTDDcl, numClust, lambda, Th, niter, T0, simAnn, 
+                       alpha, dataTDDcl_aux,FALSE) 
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
Anthropometry
 --- call from context --- 
DDfcnadj(Xmatr, Nvecr, X[ky, ])
 --- call from argument --- 
if (class(aux) == "list") {
    unitvecs <- t(matrix(unlist(aux), dim(Xmatr)[1], dim(Xmatr)[2]))
} else {
    unitvecs <- t(aux)
}
 --- R stacktrace ---
where 1: DDfcnadj(Xmatr, Nvecr, X[ky, ])
where 2: NNDDVQA1(data, pcc, lambda, norm)
where 3: TDDclust(dataTDDcl, numClust, lambda, Th, niter, T0, simAnn, 
    alpha, dataTDDcl_aux, FALSE)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (Xmatr, Nvec, y) 
{
    aux <- apply(Xmatr, 1, unitvec, b = y)
    if (class(aux) == "list") {
        unitvecs <- t(matrix(unlist(aux), dim(Xmatr)[1], dim(Xmatr)[2]))
    }
    else {
        unitvecs <- t(aux)
    }
    gvv = matrix(as.numeric(unitvecs), dim(unitvecs)[1], dim(unitvecs)[2])
    a <- Nvec/sum(Nvec)
    ebar <- sqrt(sum(apply(rowweight(gvv, a), 2, sum)^2))
    l <- rbind(y, Xmatr)
    lcorr <- cor(t(l))
    diag(lcorr) <- 0
    uc <- upper.tri(lcorr)
    lcorr[uc == 0] <- 0
    lcorr[abs(lcorr - 1) < 10^(-10)] <- 1
    lcorr[abs(lcorr - 1) > 10^(-10)] <- 0
    ccl <- apply(lcorr, 1, sum)
    ny <- 0
    if (max(ccl) == 1) {
        ny <- sum(Nvec[ccl == 1])
    }
    if (ny == 0) {
        DDy <- 1 - ebar
    }
    if (ny > 0) {
        DDy <- 1 - max(0, (ebar - ny/sum(Nvec)))
    }
    return(DDy)
}
<bytecode: 0x55e65e4a6040>
<environment: namespace:Anthropometry>
 --- function search by body ---
Function DDfcnadj in namespace Anthropometry has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1