CRAN Package Check Results for Package pointdexter

Last updated on 2020-02-19 10:49:04 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.1.1 3.49 47.37 50.86 ERROR
r-devel-linux-x86_64-debian-gcc 0.1.1 2.95 37.82 40.77 ERROR
r-devel-linux-x86_64-fedora-clang 0.1.1 63.13 ERROR
r-devel-linux-x86_64-fedora-gcc 0.1.1 60.86 ERROR
r-devel-windows-ix86+x86_64 0.1.1 8.00 58.00 66.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.1.1 13.00 61.00 74.00 OK
r-patched-linux-x86_64 0.1.1 2.90 40.13 43.03 OK
r-patched-solaris-x86 0.1.1 80.70 NOTE
r-release-linux-x86_64 0.1.1 2.86 40.33 43.19 OK
r-release-windows-ix86+x86_64 0.1.1 7.00 53.00 60.00 OK
r-release-osx-x86_64 0.1.1 NOTE
r-oldrel-windows-ix86+x86_64 0.1.1 3.00 52.00 55.00 OK
r-oldrel-osx-x86_64 0.1.1 NOTE

Check Details

Version: 0.1.1
Check: examples
Result: ERROR
    Running examples in 'pointdexter-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: LabelPointsWithinPolygons
    > ### Title: Labels points located inside a polygon
    > ### Aliases: LabelPointsWithinPolygons
    >
    > ### ** Examples
    >
    > ## SpatialPolygonsDataFrame, one polygon example ## -----
    >
    > # load necessary data ----
    > data("city_boundary_spdf")
    > data("cps_sy1819")
    >
    > # obtain boundaries for the City of Chicago ----
    > boundaries <-
    + GetPolygonBoundaries(my.polygon = city_boundary_spdf)
    >
    > # identify which schools lie within the City of Chicago -----
    > cps_sy1819$citywide <-
    + LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude
    + , lat = cps_sy1819$school_latitude
    + , polygon.boundaries = boundaries)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    pointdexter
     --- call from context ---
    LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundaries)
     --- call from argument ---
    if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
    }
     --- R stacktrace ---
    where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundaries)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (lng, lat, polygon.boundaries)
    {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
    }
    <bytecode: 0x4b94260>
    <environment: namespace:pointdexter>
     --- function search by body ---
    Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(polygon.boundaries) != "matrix") { :
     the condition has length > 1
    Calls: LabelPointsWithinPolygons
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.1
Check: tests
Result: ERROR
     Running 'testthat.R' [6s/6s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(pointdexter)
     >
     > test_check("pointdexter")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     pointdexter
     --- call from context ---
     LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     --- call from argument ---
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     --- R stacktrace ---
     where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/test-LabelPointsWithinPolygons_output.R#18: expect_is(LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary),
     "logical")
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/test-LabelPointsWithinPolygons_output.R#17: test_that("polygon.boundaries as a matrix returns a logical vector",
     {
     expect_is(LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary),
     "logical")
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("pointdexter")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (lng, lat, polygon.boundaries)
     {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
     }
     <bytecode: 0x34a9f78>
     <environment: namespace:pointdexter>
     --- function search by body ---
     Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 1. Error: polygon.boundaries as a matrix returns a logical vector (@test-Labe
     the condition has length > 1
     Backtrace:
     1. testthat::expect_is(...)
     4. pointdexter::LabelPointsWithinPolygons(...)
    
     == testthat results ===========================================================
     [ OK: 27 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: polygon.boundaries as a matrix returns a logical vector (@test-LabelPointsWithinPolygons_output.R#18)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'introduction-to-pointdexter.Rmd' using rmarkdown
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    pointdexter
     --- call from context ---
    LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     --- call from argument ---
    if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
    }
     --- R stacktrace ---
    where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
    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: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
    where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     output_dir = getwd(), ...)
    where 20: vweave_rmarkdown(...)
    where 21: engine$weave(file, quiet = quiet, encoding = enc)
    where 22: doTryCatch(return(expr), name, parentenv, handler)
    where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 24: tryCatchList(expr, classes, parentenv, handlers)
    where 25: 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 26: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/pointdexter.Rcheck/vign_test/pointdexter",
     ser_elibs = "/tmp/Rtmpuw4eND/file263a4e8c26e9.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (lng, lat, polygon.boundaries)
    {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
    }
    <bytecode: 0x63a3930>
    <environment: namespace:pointdexter>
     --- function search by body ---
    Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
    Quitting from lines 130-139 (introduction-to-pointdexter.Rmd)
    Error: processing vignette 'introduction-to-pointdexter.Rmd' failed with diagnostics:
    the condition has length > 1
    --- failed re-building 'introduction-to-pointdexter.Rmd'
    
    SUMMARY: processing the following file failed:
     'introduction-to-pointdexter.Rmd'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.1
Check: examples
Result: ERROR
    Running examples in ‘pointdexter-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: LabelPointsWithinPolygons
    > ### Title: Labels points located inside a polygon
    > ### Aliases: LabelPointsWithinPolygons
    >
    > ### ** Examples
    >
    > ## SpatialPolygonsDataFrame, one polygon example ## -----
    >
    > # load necessary data ----
    > data("city_boundary_spdf")
    > data("cps_sy1819")
    >
    > # obtain boundaries for the City of Chicago ----
    > boundaries <-
    + GetPolygonBoundaries(my.polygon = city_boundary_spdf)
    >
    > # identify which schools lie within the City of Chicago -----
    > cps_sy1819$citywide <-
    + LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude
    + , lat = cps_sy1819$school_latitude
    + , polygon.boundaries = boundaries)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    pointdexter
     --- call from context ---
    LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundaries)
     --- call from argument ---
    if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
    }
     --- R stacktrace ---
    where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundaries)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (lng, lat, polygon.boundaries)
    {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
    }
    <bytecode: 0x55c7cdc40748>
    <environment: namespace:pointdexter>
     --- function search by body ---
    Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(polygon.boundaries) != "matrix") { :
     the condition has length > 1
    Calls: LabelPointsWithinPolygons
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.1.1
Check: tests
Result: ERROR
     Running ‘testthat.R’ [4s/6s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(pointdexter)
     >
     > test_check("pointdexter")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     pointdexter
     --- call from context ---
     LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     --- call from argument ---
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     --- R stacktrace ---
     where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/test-LabelPointsWithinPolygons_output.R#18: expect_is(LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary),
     "logical")
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/test-LabelPointsWithinPolygons_output.R#17: test_that("polygon.boundaries as a matrix returns a logical vector",
     {
     expect_is(LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary),
     "logical")
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("pointdexter")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (lng, lat, polygon.boundaries)
     {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
     }
     <bytecode: 0x560b198b1e18>
     <environment: namespace:pointdexter>
     --- function search by body ---
     Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: polygon.boundaries as a matrix returns a logical vector (@test-Labe
     the condition has length > 1
     Backtrace:
     1. testthat::expect_is(...)
     4. pointdexter::LabelPointsWithinPolygons(...)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 27 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: polygon.boundaries as a matrix returns a logical vector (@test-LabelPointsWithinPolygons_output.R#18)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.1.1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building ‘introduction-to-pointdexter.Rmd’ using rmarkdown
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    pointdexter
     --- call from context ---
    LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     --- call from argument ---
    if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
    }
     --- R stacktrace ---
    where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
    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: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
    where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     output_dir = getwd(), ...)
    where 20: vweave_rmarkdown(...)
    where 21: engine$weave(file, quiet = quiet, encoding = enc)
    where 22: doTryCatch(return(expr), name, parentenv, handler)
    where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 24: tryCatchList(expr, classes, parentenv, handlers)
    where 25: 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 26: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/pointdexter.Rcheck/vign_test/pointdexter",
     ser_elibs = "/home/hornik/tmp/scratch/RtmpTgMkbK/file712c28d66c0f.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (lng, lat, polygon.boundaries)
    {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
    }
    <bytecode: 0x5619d61797c8>
    <environment: namespace:pointdexter>
     --- function search by body ---
    Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
    Quitting from lines 130-139 (introduction-to-pointdexter.Rmd)
    Error: processing vignette 'introduction-to-pointdexter.Rmd' failed with diagnostics:
    the condition has length > 1
    --- failed re-building ‘introduction-to-pointdexter.Rmd’
    
    SUMMARY: processing the following file failed:
     ‘introduction-to-pointdexter.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.1.1
Check: data for non-ASCII characters
Result: NOTE
     Note: found 328 marked UTF-8 strings
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86, r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.1.1
Check: examples
Result: ERROR
    Running examples in ‘pointdexter-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: LabelPointsWithinPolygons
    > ### Title: Labels points located inside a polygon
    > ### Aliases: LabelPointsWithinPolygons
    >
    > ### ** Examples
    >
    > ## SpatialPolygonsDataFrame, one polygon example ## -----
    >
    > # load necessary data ----
    > data("city_boundary_spdf")
    > data("cps_sy1819")
    >
    > # obtain boundaries for the City of Chicago ----
    > boundaries <-
    + GetPolygonBoundaries(my.polygon = city_boundary_spdf)
    >
    > # identify which schools lie within the City of Chicago -----
    > cps_sy1819$citywide <-
    + LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude
    + , lat = cps_sy1819$school_latitude
    + , polygon.boundaries = boundaries)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    pointdexter
     --- call from context ---
    LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundaries)
     --- call from argument ---
    if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
    }
     --- R stacktrace ---
    where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundaries)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (lng, lat, polygon.boundaries)
    {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
    }
    <bytecode: 0x3978890>
    <environment: namespace:pointdexter>
     --- function search by body ---
    Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(polygon.boundaries) != "matrix") { :
     the condition has length > 1
    Calls: LabelPointsWithinPolygons
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.1.1
Check: tests
Result: ERROR
     Running ‘testthat.R’
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(pointdexter)
     >
     > test_check("pointdexter")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     pointdexter
     --- call from context ---
     LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     --- call from argument ---
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     --- R stacktrace ---
     where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/test-LabelPointsWithinPolygons_output.R#18: expect_is(LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary),
     "logical")
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/test-LabelPointsWithinPolygons_output.R#17: test_that("polygon.boundaries as a matrix returns a logical vector",
     {
     expect_is(LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary),
     "logical")
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("pointdexter")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (lng, lat, polygon.boundaries)
     {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
     }
     <bytecode: 0x2cc0a98>
     <environment: namespace:pointdexter>
     --- function search by body ---
     Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: polygon.boundaries as a matrix returns a logical vector (@test-Labe
     the condition has length > 1
     Backtrace:
     1. testthat::expect_is(...)
     4. pointdexter::LabelPointsWithinPolygons(...)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 27 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: polygon.boundaries as a matrix returns a logical vector (@test-LabelPointsWithinPolygons_output.R#18)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.1.1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘introduction-to-pointdexter.Rmd’ using rmarkdown
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    pointdexter
     --- call from context ---
    LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     --- call from argument ---
    if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
    }
     --- R stacktrace ---
    where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
    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: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
    where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     output_dir = getwd(), ...)
    where 20: vweave_rmarkdown(...)
    where 21: engine$weave(file, quiet = quiet, encoding = enc)
    where 22: doTryCatch(return(expr), name, parentenv, handler)
    where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 24: tryCatchList(expr, classes, parentenv, handlers)
    where 25: 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 26: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-clang/pointdexter.Rcheck/vign_test/pointdexter",
     ser_elibs = "/tmp/Rtmpkb0Y9E/file8dec6cb154cb.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (lng, lat, polygon.boundaries)
    {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
    }
    <bytecode: 0x67d9f50>
    <environment: namespace:pointdexter>
     --- function search by body ---
    Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
    Quitting from lines 130-139 (introduction-to-pointdexter.Rmd)
    Error: processing vignette 'introduction-to-pointdexter.Rmd' failed with diagnostics:
    the condition has length > 1
    --- failed re-building ‘introduction-to-pointdexter.Rmd’
    
    SUMMARY: processing the following file failed:
     ‘introduction-to-pointdexter.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.1.1
Check: examples
Result: ERROR
    Running examples in ‘pointdexter-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: LabelPointsWithinPolygons
    > ### Title: Labels points located inside a polygon
    > ### Aliases: LabelPointsWithinPolygons
    >
    > ### ** Examples
    >
    > ## SpatialPolygonsDataFrame, one polygon example ## -----
    >
    > # load necessary data ----
    > data("city_boundary_spdf")
    > data("cps_sy1819")
    >
    > # obtain boundaries for the City of Chicago ----
    > boundaries <-
    + GetPolygonBoundaries(my.polygon = city_boundary_spdf)
    >
    > # identify which schools lie within the City of Chicago -----
    > cps_sy1819$citywide <-
    + LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude
    + , lat = cps_sy1819$school_latitude
    + , polygon.boundaries = boundaries)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    pointdexter
     --- call from context ---
    LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundaries)
     --- call from argument ---
    if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
    }
     --- R stacktrace ---
    where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundaries)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (lng, lat, polygon.boundaries)
    {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
    }
    <bytecode: 0x3d9a1b8>
    <environment: namespace:pointdexter>
     --- function search by body ---
    Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(polygon.boundaries) != "matrix") { :
     the condition has length > 1
    Calls: LabelPointsWithinPolygons
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.1.1
Check: tests
Result: ERROR
     Running ‘testthat.R’
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(pointdexter)
     >
     > test_check("pointdexter")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     pointdexter
     --- call from context ---
     LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     --- call from argument ---
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     --- R stacktrace ---
     where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/test-LabelPointsWithinPolygons_output.R#18: expect_is(LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary),
     "logical")
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/test-LabelPointsWithinPolygons_output.R#17: test_that("polygon.boundaries as a matrix returns a logical vector",
     {
     expect_is(LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary),
     "logical")
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("pointdexter")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (lng, lat, polygon.boundaries)
     {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
     }
     <bytecode: 0x2d8d450>
     <environment: namespace:pointdexter>
     --- function search by body ---
     Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: polygon.boundaries as a matrix returns a logical vector (@test-Labe
     the condition has length > 1
     Backtrace:
     1. testthat::expect_is(...)
     4. pointdexter::LabelPointsWithinPolygons(...)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 27 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: polygon.boundaries as a matrix returns a logical vector (@test-LabelPointsWithinPolygons_output.R#18)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.1.1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘introduction-to-pointdexter.Rmd’ using rmarkdown
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    pointdexter
     --- call from context ---
    LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
     --- call from argument ---
    if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
    }
     --- R stacktrace ---
    where 1: LabelPointsWithinPolygons(lng = cps_sy1819$school_longitude,
     lat = cps_sy1819$school_latitude, polygon.boundaries = boundary)
    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: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
    where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     output_dir = getwd(), ...)
    where 20: vweave_rmarkdown(...)
    where 21: engine$weave(file, quiet = quiet, encoding = enc)
    where 22: doTryCatch(return(expr), name, parentenv, handler)
    where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 24: tryCatchList(expr, classes, parentenv, handlers)
    where 25: 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 26: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-devel/pointdexter.Rcheck/vign_test/pointdexter",
     ser_elibs = "/tmp/RtmpNYwF9a/file5bdbad0ac05.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (lng, lat, polygon.boundaries)
    {
     if (is.numeric(lng) == FALSE) {
     stop("lng must be a numeric vector.")
     }
     if (is.numeric(lat) == FALSE) {
     stop("lat must be a numeric vector.")
     }
     if (length(lng) != length(lat)) {
     stop("lng and lat must be of equal length.")
     }
     if (any(is.na(lng))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (any(is.na(lat))) {
     stop("Filter lng and lat so that neither contain any NA values.")
     }
     if (class(polygon.boundaries) != "matrix") {
     if (!is.list(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices.\n See ?GetPolygonBoundaries for more information.")
     }
     }
     if (class(polygon.boundaries) != "list") {
     if (!is.matrix(polygon.boundaries)) {
     stop("polygon.boundaries must either be of class matrix or a list of matrices. See ?GetPolygonBoundaries for more information.")
     }
     }
     if (is.list(polygon.boundaries) & is.null(names(polygon.boundaries))) {
     stop("Please label the matrices within polygon.boundaries. See ?names for more details.")
     }
     df <- data.frame(x = lng, y = lat, index = 1:length(lng))
     if (is.matrix(polygon.boundaries)) {
     return(df$index %in% splancs::inpip(pts = df, poly = polygon.boundaries,
     bound = NULL))
     }
     else {
     temp <- lapply(X = polygon.boundaries, FUN = function(i) splancs::inpip(pts = df,
     poly = i, bound = NULL))
     names(temp) <- names(polygon.boundaries)
     temp <- utils::stack(temp)
     names(temp)[names(temp) == "values"] <- "index"
     names(temp)[names(temp) == "ind"] <- "label"
     temp$label <- as.character(temp$label)
     if (nrow(df) > nrow(temp)) {
     no.label.points <- data.frame(index = df$index[which(!df$index %in%
     temp$index)], label = NA)
     temp <- rbind(temp, no.label.points)
     }
     temp <- temp[order(temp$index), ]
     return(temp$label)
     }
    }
    <bytecode: 0x69b13a8>
    <environment: namespace:pointdexter>
     --- function search by body ---
    Function LabelPointsWithinPolygons in namespace pointdexter has this body.
     ----------- END OF FAILURE REPORT --------------
    Quitting from lines 130-139 (introduction-to-pointdexter.Rmd)
    Error: processing vignette 'introduction-to-pointdexter.Rmd' failed with diagnostics:
    the condition has length > 1
    --- failed re-building ‘introduction-to-pointdexter.Rmd’
    
    SUMMARY: processing the following file failed:
     ‘introduction-to-pointdexter.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc