Error(s) in re-building vignettes:
  ...
--- re-building ‘MPG_algorithm.Rmd’ using rmarkdown
Warning in get_engine(options$engine) :
  Unknown language engine 'cpp' (must be registered via knit_engines$set()).
--- finished re-building ‘MPG_algorithm.Rmd’

--- re-building ‘grainscape_vignette.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
grainscape
 --- call from context --- 
.local(x, ...)
 --- call from argument --- 
if (class(coords) %in% c("SpatialPoints", "SpatialPointsDataFrame")) {
    coords <- coordinates(coords)
}
 --- R stacktrace ---
where 1: .local(x, ...)
where 2: corridor(fragPatchGOC, whichThresh = 3, coords = startEnd)
where 3: corridor(fragPatchGOC, whichThresh = 3, coords = startEnd)
where 4: eval(expr, envir, enclos)
where 5: eval(expr, envir, enclos)
where 6: withVisible(eval(expr, envir, enclos))
where 7: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 8: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 9: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 10: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, 
    debug = debug, last = i == length(out), use_try = stop_on_error != 
        2L, keep_warning = keep_warning, keep_message = keep_message, 
    output_handler = output_handler, include_timing = include_timing)
where 11: evaluate::evaluate(...)
where 12: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), 
    keep_message = !isFALSE(options$message), stop_on_error = if (options$error && 
        options$include) 0L else 2L, output_handler = knit_handlers(options$render, 
        options))
where 13: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, 
    keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), 
    stop_on_error = if (options$error && options$include) 0L else 2L, 
    output_handler = knit_handlers(options$render, options)))
where 14: block_exec(params)
where 15: call_block(x)
where 16: process_group.block(group)
where 17: process_group(group)
where 18: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
    error = function(e) {
        setwd(wd)
        cat(res, sep = "\n", file = output %n% "")
        message("Quitting from lines ", paste(current_lines(i), 
            collapse = "-"), " (", knit_concord$get("infile"), 
            ") ")
    })
where 19: process_file(text, output)
where 20: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 21: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 22: vweave_rmarkdown(...)
where 23: engine$weave(file, quiet = quiet, encoding = enc)
where 24: doTryCatch(return(expr), name, parentenv, handler)
where 25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 26: tryCatchList(expr, classes, parentenv, handlers)
where 27: 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)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 28: tools:::.buildOneVignette("grainscape_vignette.Rmd", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/grainscape.Rcheck/vign_test/grainscape", 
    TRUE, FALSE, "grainscape_vignette", "UTF-8", "/home/hornik/tmp/scratch/Rtmpvwa086/file56144b3d999d.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x, whichThresh, coords, weight = "meanWeight", ...) 
{
    dots <- list(...)
    if (!is.null(dots$doPlot)) {
        warning("Argument 'doPlot' is deprecated and will be ignored.")
    }
    if ((length(whichThresh) > 1) || (!(whichThresh %in% 1:length(x@th)))) {
        stop("whichThresh must index a single threshold existing in the GOC object")
    }
    if (class(coords) %in% c("SpatialPoints", "SpatialPointsDataFrame")) {
        coords <- coordinates(coords)
    }
    if (ncol(coords) != 2) {
        stop("coords must be a SpatialPoints object or a matrix of two columns", 
            "giving X and Y coordinates")
    }
    if (nrow(coords) > 2) {
        warning("using only first two sets of coordinates for corridor start and end points")
        coords <- coords[1:2, ]
    }
    if (!(weight %in% names(edge_attr(x@th[[1]]$goc)))) {
        stop("link weight attribute with this name doesn't exist in GOC object")
    }
    edges <- as_edgelist(x@th[[whichThresh]]$goc)
    edges <- cbind(edgeNum = 1:nrow(edges), v1 = sapply(edges[, 
        1], function(z) {
        which(V(x@th[[whichThresh]]$goc)$name == z)
    }), v2 = sapply(edges[, 2], function(z) {
        which(V(x@th[[whichThresh]]$goc)$name == z)
    }))
    edgesGOC <- apply(edges, 1, function(i) {
        cbind(c(V(x@th[[whichThresh]]$goc)$centroidX[i["v1"]], 
            V(x@th[[whichThresh]]$goc)$centroidX[i["v2"]]), c(V(x@th[[whichThresh]]$goc)$centroidY[i["v1"]], 
            V(x@th[[whichThresh]]$goc)$centroidY[i["v2"]])) %>% 
            Line() %>% Lines(ID = as.character(i["edgeNum"]))
    }) %>% SpatialLines() %>% SpatialLinesDataFrame(data = data.frame(edgeNum = 1:nrow(edges), 
        weight = edge_attr(x@th[[whichThresh]]$goc, weight)))
    verticesGOC <- SpatialPoints(cbind(V(x@th[[whichThresh]]$goc)$centroidX, 
        V(x@th[[whichThresh]]$goc)$centroidY))
    startEndPolygons <- point(x, coords)$pointPolygon[, whichThresh]
    pths <- shortest_paths(x@th[[whichThresh]]$goc, which(V(x@th[[whichThresh]]$goc)$polygonId == 
        na.omit(startEndPolygons[1])), which(V(x@th[[whichThresh]]$goc)$polygonId == 
        na.omit(startEndPolygons[2])), weights = V(x@th[[whichThresh]]$goc)$meanWeight)
    startEndPath <- if (length(pths$vpath) > 0) {
        pths %>% 1[[]] %>% 1[[]] %>% as.numeric()
    }
    else {
        stop("corridor: all 'coords' correspond to cells of value 'NA'.")
    }
    shortestPathEdges <- cbind(V(x@th[[whichThresh]]$goc)$centroidX[startEndPath], 
        V(x@th[[whichThresh]]$goc)$centroidY[startEndPath]) %>% 
        Line() %>% Lines(ID = "1") %>% list() %>% SpatialLines()
    shortestPathVertices <- SpatialPoints(cbind(V(x@th[[whichThresh]]$goc)$centroidX[startEndPath], 
        V(x@th[[whichThresh]]$goc)$centroidY[startEndPath]))
    pathDist <- distances(x@th[[whichThresh]]$goc, v = V(x@th[[whichThresh]]$goc)[na.omit(startEndPath[1])], 
        weights = edge_attr(x@th[[whichThresh]]$goc, weight))[na.omit(startEndPath[length(startEndPath)])]
    voronoiBound <- boundaries(grain(x, whichThresh = whichThresh)@voronoi, 
        classes = TRUE)
    result <- new("corridor", voronoi = voronoiBound, linksSP = edgesGOC, 
        nodesSP = verticesGOC, shortestLinksSP = shortestPathEdges, 
        shortestNodesSP = shortestPathVertices, corridorLength = pathDist)
    return(result)
}
<environment: namespace:grainscape>
 --- function search by body ---
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
SUMMARY: processing the following file failed:
  ‘grainscape_vignette.Rmd’

Error: Vignette re-building failed.
Execution halted