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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: aro.clo.points
> ### Title: aro.clo.points
> ### Aliases: aro.clo.points
> 
> ### ** Examples
> 
> #load an example: mesh, and L set
> data(yoda_sur)
> data(yoda_set)
> sur<-yoda_sur
> set<-yoda_set
> ver_pos<-aro.clo.points(target=sur,reference=set) 
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
Arothron
 --- call from context --- 
aro.clo.points(target = sur, reference = set)
 --- call from argument --- 
if (class(reference) == "mesh3d") {
    reference = t(reference$vb)[, -4]
}
 --- R stacktrace ---
where 1: aro.clo.points(target = sur, reference = set)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (target, reference) 
{
    if (class(target) == "mesh3d") {
        target = t(target$vb)[, -4]
    }
    if (class(reference) == "mesh3d") {
        reference = t(reference$vb)[, -4]
    }
    if (dim(target)[2] != dim(reference)[2]) {
        stop("the number of columns (d) must be the same")
    }
    position <- NULL
    distances <- NULL
    for (i in 1:dim(reference)[1]) {
        distance <- sqrt((target[, 1] - reference[i, 1])^2 + 
            (target[, 2] - reference[i, 2])^2 + (target[, 3] - 
            reference[i, 3])^2)
        mindist_selector <- which(distance == min(distance))
        position <- c(position, mindist_selector)
        distances <- c(distances, min(distance))
    }
    out = list(position = position, distances = distances)
    return(out)
}
<bytecode: 0x909e430>
<environment: namespace:Arothron>
 --- function search by body ---
Function aro.clo.points in namespace Arothron has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(reference) == "mesh3d") { : 
  the condition has length > 1
Calls: aro.clo.points
Execution halted