Error(s) in re-building vignettes:
--- re-building ‘gdistance1.Rnw’ using Sweave
Loading required package: raster
Loading required package: sp
Loading required package: igraph

Attaching package: ‘igraph’

The following object is masked from ‘package:raster’:

    union

The following objects are masked from ‘package:stats’:

    decompose, spectrum

The following object is masked from ‘package:base’:

    union

Loading required package: Matrix

Attaching package: ‘gdistance’

The following object is masked from ‘package:igraph’:

    normalize

 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
gdistance
 --- call from context --- 
.coordsToMatrix(fromCoords)
 --- call from argument --- 
if (class(Coords) == "numeric") {
    if (length(Coords) == 2) {
        Coords <- t(as.matrix(Coords))
    }
    else {
        stop("coordinates given as a vector, but the vector does not have a length of two")
    }
}
 --- R stacktrace ---
where 1: .coordsToMatrix(fromCoords)
where 2: .cd2(x, fromCoords)
where 3: .local(x, fromCoords)
where 4: costDistance(tr3C, sP)
where 5: costDistance(tr3C, sP)
where 6: eval(expr, .GlobalEnv)
where 7: eval(expr, .GlobalEnv)
where 8: withVisible(eval(expr, .GlobalEnv))
where 9: doTryCatch(return(expr), name, parentenv, handler)
where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 11: tryCatchList(expr, classes, parentenv, handlers)
where 12: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 13: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 14: evalFunc(ce, options)
where 15: tryCatchList(expr, classes, parentenv, handlers)
where 16: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 17: driver$runcode(drobj, chunk, chunkopts)
where 18: utils::Sweave(...)
where 19: engine$weave(file, quiet = quiet, encoding = enc)
where 20: doTryCatch(return(expr), name, parentenv, handler)
where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 22: tryCatchList(expr, classes, parentenv, handlers)
where 23: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
    outputs <- c(outputs, output)
}, error = function(e) {
    thisOK <<- FALSE
    fails <<- c(fails, file)
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 24: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-devel/gdistance.Rcheck/vign_test/gdistance", 
    ser_elibs = "/tmp/Rtmp0aZyrT/file8fecff8db19.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (Coords) 
{
    if (class(Coords) == "numeric") {
        if (length(Coords) == 2) {
            Coords <- t(as.matrix(Coords))
        }
        else {
            stop("coordinates given as a vector, but the vector does not have a length of two")
        }
    }
    if (class(Coords) == "matrix") {
        if (!(ncol(Coords) == 2)) {
            stop("coordinates given as a matrix, but the matrix does not have two columns")
        }
    }
    if (inherits(Coords, "SpatialPoints")) {
        Coords <- coordinates(Coords)
    }
    return(Coords)
}
<bytecode: 0xe407540>
<environment: namespace:gdistance>
 --- function search by body ---
Function .coordsToMatrix in namespace gdistance has this body.
 ----------- END OF FAILURE REPORT -------------- 

Error: processing vignette 'gdistance1.Rnw' failed with diagnostics:
 chunk 19 (label = gdistance-13) 
Error in if (class(Coords) == "numeric") { : the condition has length > 1

--- failed re-building 'gdistance1.Rnw'

SUMMARY: processing the following file failed:
  'gdistance1.Rnw'

Error: Vignette re-building failed.
Execution halted