Error(s) in re-building vignettes:
  ...
--- re-building ‘mapmisc.Rnw’ using knitr
Loading required package: sp
Loading required package: raster
map images will be cached in  /home/hornik/tmp/scratch/Rtmpj7ARTz/mapmiscCache
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
mapmisc
 --- call from context --- 
openmap(meuse)
 --- call from argument --- 
if (class(bboxx) != "try-error" & class(projx) != "try-error") {
    if (identical(projx, crsOut)) {
        bigExtent = extend(extent(x), buffer + abs(as.numeric(apply(bboxx, 
            1, diff))/2))
        toRaster = raster::crop(toRaster, bigExtent)
    }
}
 --- R stacktrace ---
where 1: openmap(meuse)
where 2: eval(expr, envir, enclos)
where 3: eval(expr, envir, enclos)
where 4: withVisible(eval(expr, envir, enclos))
where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 8: 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 9: evaluate::evaluate(...)
where 10: 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 11: 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 12: block_exec(params)
where 13: call_block(x)
where 14: process_group.block(group)
where 15: process_group(group)
where 16: 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 17: process_file(text, output)
where 18: (if (grepl("\\.[Rr]md$", file)) knit2html_v1 else if (grepl("\\.[Rr]rst$", 
    file)) knit2pandoc else knit)(file, encoding = encoding, 
    quiet = quiet, envir = globalenv(), ...)
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)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 24: tools:::.buildOneVignette("mapmisc.Rnw", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/mapmisc.Rcheck/vign_test/mapmisc", 
    TRUE, TRUE, "mapmisc", "", "/home/hornik/tmp/scratch/RtmpMN3k0T/file3f9a736072ae.rds")

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (x, zoom, path = "http://tile.openstreetmap.org/", maxTiles = 9, 
    crs = projection(x), buffer = 0, fact = 1, verbose = getOption("mapmiscVerbose"), 
    cachePath = getOption("mapmiscCachePath")) 
{
    verbose = max(c(0, verbose))
    if (is.null(cachePath)) {
        cachePath = tempdir()
    }
    if (!nchar(cachePath)) {
        cachePath = "."
    }
    alltiles = osmTiles()
    pathOrig = path
    pathisname = gsub("-", ".", pathOrig) %in% gsub("-", ".", 
        names(alltiles))
    path[pathisname] = alltiles[path[pathisname]]
    if (length(grep("[[:punct:]]$", path, invert = TRUE))) 
        path[grep("[[:punct:]]$", path, invert = TRUE)] = paste(path[grep("[[:punct:]]$", 
            path, invert = TRUE)], "/", sep = "")
    if (length(grep("^http[s]*://", path, invert = TRUE))) 
        path[grep("^http[s]*://", path, invert = TRUE)] = paste("http://", 
            path[grep("^http[s]*://", path, invert = TRUE)], 
            sep = "")
    names(path) = pathOrig
    if (all(class(x) == "CRS")) {
        crs = x
        toCrop = attributes(x)$ellipse
        x = attributes(x)$regionLL
    }
    else {
        toCrop = NULL
    }
    crsOut = crs
    crsIn = crs(x)
    if (all(is.na(crsIn))) {
        if (is.vector(x)) {
            crsIn = crsLL
        }
        else {
            crsIn = crs
        }
    }
    extMerc = .getExtent(x, crsIn, buffer, crsMerc)
    extMerc = .cropExtent(extMerc, extentMerc)
    if (missing(zoom)) {
        zoom = 1
        while (nTilesMerc(extMerc, zoom) <= maxTiles & zoom <= 
            18) {
            zoom = zoom + 1
        }
        zoom = min(c(18, max(c(1, zoom - 1))))
    }
    if (verbose) 
        cat("zoom is ", zoom, ", ", nTilesMerc(extMerc, zoom), 
            "tiles\n")
    result = NULL
    for (Dpath in rev(names(path))) {
        Durl = path[Dpath]
        if (verbose) {
            cat(Dpath, "\n")
            cat(Durl, "\n")
        }
        if (length(grep("nrcan\\.gc\\.ca|gov\\.bc\\.ca", Durl))) {
            suffix = ""
            tileNames = "zyx"
        }
        else if (length(grep("[.]arcgisonline[.]com", Durl))) {
            suffix = ".jpg"
            tileNames = "zyx"
        }
        else if (length(grep("heidelberg.de/tiles/(hybrid|adminb|roadsg|roads)/?$", 
            Durl)) | length(grep("&$", Durl))) {
            tileNames = "xyz="
            suffix = ""
        }
        else {
            suffix = ".png"
            tileNames = "zxy"
        }
        if (length(attributes(pathOrig)$tileNames)) 
            tileNames = attributes(pathOrig)$tileNames
        if (length(attributes(pathOrig)$suffix)) 
            suffix = attributes(pathOrig)$suffix
        thistile = try(getTilesMerc(extMerc, zoom = zoom, path = Durl, 
            verbose = verbose, suffix = suffix, tileNames = tileNames, 
            cachePath = cachePath), silent = !verbose)
        if (class(thistile) == "try-error") {
            message(paste(Durl, "not accessible"))
            thistile = NULL
        }
        else {
            if (length(names(thistile))) {
                theprefix = strsplit(names(thistile), "([rR]ed|[gG]reen|[bB]lue)$", 
                  fixed = FALSE)[[1]]
                names(thistile) = gsub(theprefix, paste(Dpath, 
                  "", sep = ""), names(thistile), fixed = TRUE)
            }
            ctable = NULL
            if (!is.null(thistile)) {
                if (nlayers(thistile) == 1) 
                  ctable = thistile@legend@colortable
                if (is.null(result)) {
                  result = stack(thistile)
                }
                else {
                  result = stack(result, thistile)
                }
            }
        }
    }
    if (is.null(result)) {
        result = raster(extMerc, 1, 1, crs = crsMerc)
        values(result) = NA
        attributes(result)$openmap = list(tiles = NA, message = thistile, 
            path = path, zoom = zoom)
    }
    if (!is.na(crsOut)) {
        oldColorTable = list()
        for (D in names(result)) oldColorTable[[D]] = result[[D]]@legend@colortable
        if (verbose) 
            cat("reprojecting ", ncell(result), " cells...")
        if (!compareCRS(projection(result), crsOut)) {
            toRaster = projectExtent(result, crsOut)
            bboxx = try(bbox(extend(extent(x), buffer)), silent = TRUE)
            if (any(apply(bboxx, 1, diff) < .Machine$double.eps)) {
                class(bboxx) = "try-error"
            }
            projx = try(proj4string(x), silent = TRUE)
            if (class(bboxx) != "try-error" & class(projx) != 
                "try-error") {
                if (identical(projx, crsOut)) {
                  bigExtent = extend(extent(x), buffer + abs(as.numeric(apply(bboxx, 
                    1, diff))/2))
                  toRaster = raster::crop(toRaster, bigExtent)
                }
            }
            if (any(fact > 1)) {
                res(toRaster) = res(toRaster)/rep_len(fact, 2)
            }
            resultProj1 = suppressWarnings(projectRaster(result, 
                toRaster, method = "ngb"))
            resultProj = stack(resultProj1)
            for (D in names(resultProj)) resultProj[[D]]@legend@colortable = oldColorTable[[D]]
            if (verbose) 
                cat("done\n")
        }
        else {
            if (any(fact < 1)) {
                fact = pmax(1, round(1/fact))
                if (any(fact > 1)) {
                  if (verbose) 
                    cat("aggregating tiles by ", fact, "\n")
                  resultProj = stack(aggregate(result, fact = fact, 
                    fun = min))
                  for (D in names(resultProj)) resultProj[[D]]@legend = result[[D]]@legend
                }
            }
            else {
                if (verbose) 
                  cat("tiles arrived in the desired projection\n")
                resultProj = stack(result)
            }
        }
    }
    else {
        resultProj = stack(result)
    }
    for (D in names(resultProj)) {
        if (length(result[[D]]@legend@colortable)) {
            if (verbose) 
                cat("copying colortable for ", D, "\n")
            resultProj[[D]]@legend@colortable = result[[D]]@legend@colortable
            if (any(values(resultProj[[D]]) == 0, na.rm = TRUE) | 
                any(is.na(values(resultProj[[D]])))) {
                resultProj[[D]]@legend@colortable = c("#FFFFFF00", 
                  resultProj[[D]]@legend@colortable)
                values(resultProj[[D]]) = 1 + values(resultProj[[D]])
            }
        }
    }
    if (nlayers(resultProj) == 1) 
        resultProj = resultProj[[1]]
    attributes(resultProj)$tiles = attributes(thistile)$tiles
    attributes(resultProj)$tiles$path = path
    resultProj
}
<bytecode: 0x55e6ba39e3a0>
<environment: namespace:mapmisc>
 --- function search by body ---
Function openmap in namespace mapmisc has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
--- re-building ‘north.Rmd’ using docco_linear
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
mapmisc
 --- call from context --- 
openmap(x, path = "osm-no-labels", maxTiles = 12, buffer = c(30, 
    3), fact = fact)
 --- call from argument --- 
if (class(bboxx) != "try-error" & class(projx) != "try-error") {
    if (identical(projx, crsOut)) {
        bigExtent = extend(extent(x), buffer + abs(as.numeric(apply(bboxx, 
            1, diff))/2))
        toRaster = raster::crop(toRaster, bigExtent)
    }
}
 --- R stacktrace ---
where 1 at <text>#2: openmap(x, path = "osm-no-labels", maxTiles = 12, buffer = c(30, 
    3), fact = fact)
where 2: eval(expr, envir, enclos)
where 3: eval(expr, envir, enclos)
where 4: withVisible(eval(expr, envir, enclos))
where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 8: 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 9: evaluate::evaluate(...)
where 10: 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 11: 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 12: block_exec(params)
where 13: call_block(x)
where 14: process_group.block(group)
where 15: process_group(group)
where 16: 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 17: process_file(text, output)
where 18: knit(input, text = text, envir = envir, quiet = quiet)
where 19: knit2html(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    template = system.file("misc", "docco-template.html", package = "knitr"), 
    ...)
where 20: engine$weave(file, quiet = quiet, encoding = enc)
where 21: doTryCatch(return(expr), name, parentenv, handler)
where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 23: tryCatchList(expr, classes, parentenv, handlers)
where 24: 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 25: tools:::.buildOneVignette("north.Rmd", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/mapmisc.Rcheck/vign_test/mapmisc", 
    TRUE, TRUE, "north", "", "/home/hornik/tmp/scratch/RtmpMN3k0T/file3f9a7419d8a8.rds")

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (x, zoom, path = "http://tile.openstreetmap.org/", maxTiles = 9, 
    crs = projection(x), buffer = 0, fact = 1, verbose = getOption("mapmiscVerbose"), 
    cachePath = getOption("mapmiscCachePath")) 
{
    verbose = max(c(0, verbose))
    if (is.null(cachePath)) {
        cachePath = tempdir()
    }
    if (!nchar(cachePath)) {
        cachePath = "."
    }
    alltiles = osmTiles()
    pathOrig = path
    pathisname = gsub("-", ".", pathOrig) %in% gsub("-", ".", 
        names(alltiles))
    path[pathisname] = alltiles[path[pathisname]]
    if (length(grep("[[:punct:]]$", path, invert = TRUE))) 
        path[grep("[[:punct:]]$", path, invert = TRUE)] = paste(path[grep("[[:punct:]]$", 
            path, invert = TRUE)], "/", sep = "")
    if (length(grep("^http[s]*://", path, invert = TRUE))) 
        path[grep("^http[s]*://", path, invert = TRUE)] = paste("http://", 
            path[grep("^http[s]*://", path, invert = TRUE)], 
            sep = "")
    names(path) = pathOrig
    if (all(class(x) == "CRS")) {
        crs = x
        toCrop = attributes(x)$ellipse
        x = attributes(x)$regionLL
    }
    else {
        toCrop = NULL
    }
    crsOut = crs
    crsIn = crs(x)
    if (all(is.na(crsIn))) {
        if (is.vector(x)) {
            crsIn = crsLL
        }
        else {
            crsIn = crs
        }
    }
    extMerc = .getExtent(x, crsIn, buffer, crsMerc)
    extMerc = .cropExtent(extMerc, extentMerc)
    if (missing(zoom)) {
        zoom = 1
        while (nTilesMerc(extMerc, zoom) <= maxTiles & zoom <= 
            18) {
            zoom = zoom + 1
        }
        zoom = min(c(18, max(c(1, zoom - 1))))
    }
    if (verbose) 
        cat("zoom is ", zoom, ", ", nTilesMerc(extMerc, zoom), 
            "tiles\n")
    result = NULL
    for (Dpath in rev(names(path))) {
        Durl = path[Dpath]
        if (verbose) {
            cat(Dpath, "\n")
            cat(Durl, "\n")
        }
        if (length(grep("nrcan\\.gc\\.ca|gov\\.bc\\.ca", Durl))) {
            suffix = ""
            tileNames = "zyx"
        }
        else if (length(grep("[.]arcgisonline[.]com", Durl))) {
            suffix = ".jpg"
            tileNames = "zyx"
        }
        else if (length(grep("heidelberg.de/tiles/(hybrid|adminb|roadsg|roads)/?$", 
            Durl)) | length(grep("&$", Durl))) {
            tileNames = "xyz="
            suffix = ""
        }
        else {
            suffix = ".png"
            tileNames = "zxy"
        }
        if (length(attributes(pathOrig)$tileNames)) 
            tileNames = attributes(pathOrig)$tileNames
        if (length(attributes(pathOrig)$suffix)) 
            suffix = attributes(pathOrig)$suffix
        thistile = try(getTilesMerc(extMerc, zoom = zoom, path = Durl, 
            verbose = verbose, suffix = suffix, tileNames = tileNames, 
            cachePath = cachePath), silent = !verbose)
        if (class(thistile) == "try-error") {
            message(paste(Durl, "not accessible"))
            thistile = NULL
        }
        else {
            if (length(names(thistile))) {
                theprefix = strsplit(names(thistile), "([rR]ed|[gG]reen|[bB]lue)$", 
                  fixed = FALSE)[[1]]
                names(thistile) = gsub(theprefix, paste(Dpath, 
                  "", sep = ""), names(thistile), fixed = TRUE)
            }
            ctable = NULL
            if (!is.null(thistile)) {
                if (nlayers(thistile) == 1) 
                  ctable = thistile@legend@colortable
                if (is.null(result)) {
                  result = stack(thistile)
                }
                else {
                  result = stack(result, thistile)
                }
            }
        }
    }
    if (is.null(result)) {
        result = raster(extMerc, 1, 1, crs = crsMerc)
        values(result) = NA
        attributes(result)$openmap = list(tiles = NA, message = thistile, 
            path = path, zoom = zoom)
    }
    if (!is.na(crsOut)) {
        oldColorTable = list()
        for (D in names(result)) oldColorTable[[D]] = result[[D]]@legend@colortable
        if (verbose) 
            cat("reprojecting ", ncell(result), " cells...")
        if (!compareCRS(projection(result), crsOut)) {
            toRaster = projectExtent(result, crsOut)
            bboxx = try(bbox(extend(extent(x), buffer)), silent = TRUE)
            if (any(apply(bboxx, 1, diff) < .Machine$double.eps)) {
                class(bboxx) = "try-error"
            }
            projx = try(proj4string(x), silent = TRUE)
            if (class(bboxx) != "try-error" & class(projx) != 
                "try-error") {
                if (identical(projx, crsOut)) {
                  bigExtent = extend(extent(x), buffer + abs(as.numeric(apply(bboxx, 
                    1, diff))/2))
                  toRaster = raster::crop(toRaster, bigExtent)
                }
            }
            if (any(fact > 1)) {
                res(toRaster) = res(toRaster)/rep_len(fact, 2)
            }
            resultProj1 = suppressWarnings(projectRaster(result, 
                toRaster, method = "ngb"))
            resultProj = stack(resultProj1)
            for (D in names(resultProj)) resultProj[[D]]@legend@colortable = oldColorTable[[D]]
            if (verbose) 
                cat("done\n")
        }
        else {
            if (any(fact < 1)) {
                fact = pmax(1, round(1/fact))
                if (any(fact > 1)) {
                  if (verbose) 
                    cat("aggregating tiles by ", fact, "\n")
                  resultProj = stack(aggregate(result, fact = fact, 
                    fun = min))
                  for (D in names(resultProj)) resultProj[[D]]@legend = result[[D]]@legend
                }
            }
            else {
                if (verbose) 
                  cat("tiles arrived in the desired projection\n")
                resultProj = stack(result)
            }
        }
    }
    else {
        resultProj = stack(result)
    }
    for (D in names(resultProj)) {
        if (length(result[[D]]@legend@colortable)) {
            if (verbose) 
                cat("copying colortable for ", D, "\n")
            resultProj[[D]]@legend@colortable = result[[D]]@legend@colortable
            if (any(values(resultProj[[D]]) == 0, na.rm = TRUE) | 
                any(is.na(values(resultProj[[D]])))) {
                resultProj[[D]]@legend@colortable = c("#FFFFFF00", 
                  resultProj[[D]]@legend@colortable)
                values(resultProj[[D]]) = 1 + values(resultProj[[D]])
            }
        }
    }
    if (nlayers(resultProj) == 1) 
        resultProj = resultProj[[1]]
    attributes(resultProj)$tiles = attributes(thistile)$tiles
    attributes(resultProj)$tiles$path = path
    resultProj
}
<bytecode: 0x5565ee654be0>
<environment: namespace:mapmisc>
 --- function search by body ---
Function openmap in namespace mapmisc has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
make[1]: Entering directory '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/mapmisc.Rcheck/vign_test/mapmisc/vignettes'
R --slave -e "knitr::knit('north.Rmd')" fact=2
ARGUMENT 'fact=2' __ignored__



processing file: north.Rmd
  ordinary text without R code

label: setup (with options) 
List of 1
 $ include: logi FALSE

  ordinary text without R code

label: mapmiscCache (with options) 
List of 1
 $ purl: logi FALSE

  ordinary text without R code

label: data
  ordinary text without R code

label: osm
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
mapmisc
 --- call from context --- 
openmap(x, path = "osm-no-labels", maxTiles = 12, buffer = c(30, 
    3), fact = fact)
 --- call from argument --- 
if (class(bboxx) != "try-error" & class(projx) != "try-error") {
    if (identical(projx, crsOut)) {
        bigExtent = extend(extent(x), buffer + abs(as.numeric(apply(bboxx, 
            1, diff))/2))
        toRaster = raster::crop(toRaster, bigExtent)
    }
}
 --- R stacktrace ---
where 1 at <text>#2: openmap(x, path = "osm-no-labels", maxTiles = 12, buffer = c(30, 
    3), fact = fact)
where 2: eval(expr, envir, enclos)
where 3: eval(expr, envir, enclos)
where 4: withVisible(eval(expr, envir, enclos))
where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, classes, parentenv, handlers)
where 9: 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 10: try(f, silent = TRUE)
where 11: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 12: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 13: 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 14: evaluate::evaluate(...)
where 15: 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 16: 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 17: block_exec(params)
where 18: call_block(x)
where 19: process_group.block(group)
where 20: process_group(group)
where 21: 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 22: process_file(text, output)
where 23: knitr::knit("north.Rmd")

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (x, zoom, path = "http://tile.openstreetmap.org/", maxTiles = 9, 
    crs = projection(x), buffer = 0, fact = 1, verbose = getOption("mapmiscVerbose"), 
    cachePath = getOption("mapmiscCachePath")) 
{
    verbose = max(c(0, verbose))
    if (is.null(cachePath)) {
        cachePath = tempdir()
    }
    if (!nchar(cachePath)) {
        cachePath = "."
    }
    alltiles = osmTiles()
    pathOrig = path
    pathisname = gsub("-", ".", pathOrig) %in% gsub("-", ".", 
        names(alltiles))
    path[pathisname] = alltiles[path[pathisname]]
    if (length(grep("[[:punct:]]$", path, invert = TRUE))) 
        path[grep("[[:punct:]]$", path, invert = TRUE)] = paste(path[grep("[[:punct:]]$", 
            path, invert = TRUE)], "/", sep = "")
    if (length(grep("^http[s]*://", path, invert = TRUE))) 
        path[grep("^http[s]*://", path, invert = TRUE)] = paste("http://", 
            path[grep("^http[s]*://", path, invert = TRUE)], 
            sep = "")
    names(path) = pathOrig
    if (all(class(x) == "CRS")) {
        crs = x
        toCrop = attributes(x)$ellipse
        x = attributes(x)$regionLL
    }
    else {
        toCrop = NULL
    }
    crsOut = crs
    crsIn = crs(x)
    if (all(is.na(crsIn))) {
        if (is.vector(x)) {
            crsIn = crsLL
        }
        else {
            crsIn = crs
        }
    }
    extMerc = .getExtent(x, crsIn, buffer, crsMerc)
    extMerc = .cropExtent(extMerc, extentMerc)
    if (missing(zoom)) {
        zoom = 1
        while (nTilesMerc(extMerc, zoom) <= maxTiles & zoom <= 
            18) {
            zoom = zoom + 1
        }
        zoom = min(c(18, max(c(1, zoom - 1))))
    }
    if (verbose) 
        cat("zoom is ", zoom, ", ", nTilesMerc(extMerc, zoom), 
            "tiles\n")
    result = NULL
    for (Dpath in rev(names(path))) {
        Durl = path[Dpath]
        if (verbose) {
            cat(Dpath, "\n")
            cat(Durl, "\n")
        }
        if (length(grep("nrcan\\.gc\\.ca|gov\\.bc\\.ca", Durl))) {
            suffix = ""
            tileNames = "zyx"
        }
        else if (length(grep("[.]arcgisonline[.]com", Durl))) {
            suffix = ".jpg"
            tileNames = "zyx"
        }
        else if (length(grep("heidelberg.de/tiles/(hybrid|adminb|roadsg|roads)/?$", 
            Durl)) | length(grep("&$", Durl))) {
            tileNames = "xyz="
            suffix = ""
        }
        else {
            suffix = ".png"
            tileNames = "zxy"
        }
        if (length(attributes(pathOrig)$tileNames)) 
            tileNames = attributes(pathOrig)$tileNames
        if (length(attributes(pathOrig)$suffix)) 
            suffix = attributes(pathOrig)$suffix
        thistile = try(getTilesMerc(extMerc, zoom = zoom, path = Durl, 
            verbose = verbose, suffix = suffix, tileNames = tileNames, 
            cachePath = cachePath), silent = !verbose)
        if (class(thistile) == "try-error") {
            message(paste(Durl, "not accessible"))
            thistile = NULL
        }
        else {
            if (length(names(thistile))) {
                theprefix = strsplit(names(thistile), "([rR]ed|[gG]reen|[bB]lue)$", 
                  fixed = FALSE)[[1]]
                names(thistile) = gsub(theprefix, paste(Dpath, 
                  "", sep = ""), names(thistile), fixed = TRUE)
            }
            ctable = NULL
            if (!is.null(thistile)) {
                if (nlayers(thistile) == 1) 
                  ctable = thistile@legend@colortable
                if (is.null(result)) {
                  result = stack(thistile)
                }
                else {
                  result = stack(result, thistile)
                }
            }
        }
    }
    if (is.null(result)) {
        result = raster(extMerc, 1, 1, crs = crsMerc)
        values(result) = NA
        attributes(result)$openmap = list(tiles = NA, message = thistile, 
            path = path, zoom = zoom)
    }
    if (!is.na(crsOut)) {
        oldColorTable = list()
        for (D in names(result)) oldColorTable[[D]] = result[[D]]@legend@colortable
        if (verbose) 
            cat("reprojecting ", ncell(result), " cells...")
        if (!compareCRS(projection(result), crsOut)) {
            toRaster = projectExtent(result, crsOut)
            bboxx = try(bbox(extend(extent(x), buffer)), silent = TRUE)
            if (any(apply(bboxx, 1, diff) < .Machine$double.eps)) {
                class(bboxx) = "try-error"
            }
            projx = try(proj4string(x), silent = TRUE)
            if (class(bboxx) != "try-error" & class(projx) != 
                "try-error") {
                if (identical(projx, crsOut)) {
                  bigExtent = extend(extent(x), buffer + abs(as.numeric(apply(bboxx, 
                    1, diff))/2))
                  toRaster = raster::crop(toRaster, bigExtent)
                }
            }
            if (any(fact > 1)) {
                res(toRaster) = res(toRaster)/rep_len(fact, 2)
            }
            resultProj1 = suppressWarnings(projectRaster(result, 
                toRaster, method = "ngb"))
            resultProj = stack(resultProj1)
            for (D in names(resultProj)) resultProj[[D]]@legend@colortable = oldColorTable[[D]]
            if (verbose) 
                cat("done\n")
        }
        else {
            if (any(fact < 1)) {
                fact = pmax(1, round(1/fact))
                if (any(fact > 1)) {
                  if (verbose) 
                    cat("aggregating tiles by ", fact, "\n")
                  resultProj = stack(aggregate(result, fact = fact, 
                    fun = min))
                  for (D in names(resultProj)) resultProj[[D]]@legend = result[[D]]@legend
                }
            }
            else {
                if (verbose) 
                  cat("tiles arrived in the desired projection\n")
                resultProj = stack(result)
            }
        }
    }
    else {
        resultProj = stack(result)
    }
    for (D in names(resultProj)) {
        if (length(result[[D]]@legend@colortable)) {
            if (verbose) 
                cat("copying colortable for ", D, "\n")
            resultProj[[D]]@legend@colortable = result[[D]]@legend@colortable
            if (any(values(resultProj[[D]]) == 0, na.rm = TRUE) | 
                any(is.na(values(resultProj[[D]])))) {
                resultProj[[D]]@legend@colortable = c("#FFFFFF00", 
                  resultProj[[D]]@legend@colortable)
                values(resultProj[[D]]) = 1 + values(resultProj[[D]])
            }
        }
    }
    if (nlayers(resultProj) == 1) 
        resultProj = resultProj[[1]]
    attributes(resultProj)$tiles = attributes(thistile)$tiles
    attributes(resultProj)$tiles$path = path
    resultProj
}
<bytecode: 0x55e3795f3af8>
<environment: namespace:mapmisc>
 --- function search by body ---
Function openmap in namespace mapmisc has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
make[1]: *** [Makefile:15: north.md] Error 2
make[1]: Leaving directory '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/mapmisc.Rcheck/vign_test/mapmisc/vignettes'
Error in tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/mapmisc.Rcheck/vign_test/mapmisc",  : 
  running ‘make’ failed
Execution halted