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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: earth.poly
> ### Title: Calculating a Minimum Convex Polygon
> ### Aliases: earth.poly
> ### Keywords: graphs
> 
> ### ** Examples
> 
> #1/8th the surface area of the earth
> a <- matrix(c(0, 0, 0, 90, 90, 0, 25, 25), 4, 2, byrow = TRUE)
> earth.poly(a)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
fossil
 --- call from context --- 
earth.poly(a)
 --- call from argument --- 
if (class(lats) == "SpatialPoints") lats <- coordinates(lats)
 --- R stacktrace ---
where 1: earth.poly(a)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (lats) 
{
    if (class(lats) == "SpatialPoints") 
        lats <- coordinates(lats)
    lats <- unique(lats)
    rownames.lats <- rownames(lats)
    nr <- nrow(lats)
    bm <- matrix(, nr, nr)
    for (i in 1:nr) {
        for (j in 1:nr) {
            if (i == j) 
                bm[i, j] <- -1
            else bm[i, j] <- earth.bear(long1 = lats[i, 1], lat1 = lats[i, 
                2], long2 = lats[j, 1], lat2 = lats[j, 2])
        }
    }
    qm <- matrix(, nr, 4)
    for (i in 1:nr) {
        qm[i, 1] <- length(bm[1, ][bm[i, ] >= 0]) - length(bm[i, 
            ][bm[i, ] >= 90])
        qm[i, 2] <- length(bm[1, ][bm[i, ] >= 90]) - length(bm[i, 
            ][bm[i, ] >= 180])
        qm[i, 3] <- length(bm[1, ][bm[i, ] >= 180]) - length(bm[i, 
            ][bm[i, ] >= 270])
        qm[i, 4] <- length(bm[1, ][bm[i, ] >= 270])
    }
    id <- numeric(nr)
    for (i in 1:nr) {
        for (j in 1:4) {
            if (length(qm[i, ][qm[i, ] > 0]) <= 2) 
                id[i] <- i
            else {
                if (length(qm[i, ][qm[i, ] > 0]) == 3) {
                  if (length(qm[i, 2:3][qm[i, 2:3] > 0]) == 2) {
                    if ((max(bm[i, ]) - min(bm[i, ][bm[i, ] >= 
                      0])) < 180) 
                      id[i] <- i
                  }
                  else {
                    if ((360 - min(bm[i, ][bm[i, ] > 180]) + 
                      max(bm[i, ][bm[i, ] < 180])) < 180) 
                      id[i] <- i
                  }
                }
            }
        }
    }
    mi <- id[id > 0]
    prpt <- mi[1]
    snpts <- mi[-1]
    pt <- bm[prpt, snpts]
    if ((max(pt) - min(pt)) > 180) {
        pt[pt < 180] <- pt[pt < 180] + 360
    }
    rpt <- rank(pt)
    ind <- numeric(length(pt))
    for (i in 1:length(pt)) ind[rpt[i]] <- snpts[i]
    ta <- numeric(1)
    for (i in 1:(length(pt) - 1)) {
        k <- i + 1
        ta <- ta + earth.tri(long1 = lats[prpt, 1], lat1 = lats[prpt, 
            2], long2 = lats[ind[i], 1], lat2 = lats[ind[i], 
            2], long3 = lats[ind[k], 1], lat3 = lats[ind[k], 
            2])
    }
    verts <- c(prpt, ind)
    return(list(area = ta, vertices = verts))
}
<bytecode: 0x1375278>
<environment: namespace:fossil>
 --- function search by body ---
Function earth.poly in namespace fossil has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(lats) == "SpatialPoints") lats <- coordinates(lats) : 
  the condition has length > 1
Calls: earth.poly
Execution halted