Running ‘testthat.R’ [4s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(MazamaSpatialUtils)
  Loading required package: sp
  > 
  > test_check("MazamaSpatialUtils")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  ● On CRAN (26)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-MazamaSpatialUtils.R:93:4): Returns expected output ───────────
  countryToCode("Netherlands Antilles") not equal to "AN".
  Modes: list, character
  Component 1: target is NULL, current is character
  ── Error (test-getCountry.R:11:3): returns correct name ────────────────────────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_match(getCountry(2, 47), "France") test-getCountry.R:11:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getCountry(2, 47)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getCountry.R:19:3): subsetting with countryCodes works ──────────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_match(getCountry(2, 47), "France") test-getCountry.R:19:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getCountry(2, 47)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getCountry.R:25:3): allData returns are correct dimension and type ──
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_s3_class(...) test-getCountry.R:25:2
    2. │ └─testthat::quasi_label(enquo(object), arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getCountry(2, 47, allData = TRUE)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getCountryCode.R:11:3): returns correct name ────────────────────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_match(getCountryCode(2, 47), "FR") test-getCountryCode.R:11:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getCountryCode(2, 47)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getCountryCode.R:19:3): subsetting with countryCodes works ──────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_match(getCountryCode(2, 47), "FR") test-getCountryCode.R:19:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getCountryCode(2, 47)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getCountryCode.R:25:3): allData returns are correct dimension and type ──
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_s3_class(...) test-getCountryCode.R:25:2
    2. │ └─testthat::quasi_label(enquo(object), arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getCountryCode(2, 47, allData = TRUE)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getCountryName.R:11:3): returns correct name ────────────────────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_match(getCountryName(2, 47), "France") test-getCountryName.R:11:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getCountryName(2, 47)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getCountryName.R:19:3): subsetting with countryCodes works ──────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_match(getCountryName(2, 47), "France") test-getCountryName.R:19:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getCountryName(2, 47)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getCountryName.R:25:3): allData returns are correct dimension and type ──
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_s3_class(...) test-getCountryName.R:25:2
    2. │ └─testthat::quasi_label(enquo(object), arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getCountryName(2, 47, allData = TRUE)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getSpatialData.R:13:3): returns correct name ────────────────────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_match(...) test-getSpatialData.R:13:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getSpatialData(2, 47, SimpleCountries)
    5.   ├─sp::over(location, SPDF)
    6.   └─sp::over(location, SPDF)
    7.     └─sp:::.local(x, y, returnList, fn, ...)
    8.       ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
    9.       └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp:::pointsInSpatialPolygons(x, y, returnList)
   11.           └─sp:::pointsInPolys2(...)
  ── Error (test-getSpatialData.R:21:3): buffering works ─────────────────────────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_match(...) test-getSpatialData.R:21:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getSpatialData(...)
    5.   ├─sp::over(location, SPDF)
    6.   └─sp::over(location, SPDF)
    7.     └─sp:::.local(x, y, returnList, fn, ...)
    8.       ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
    9.       └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp:::pointsInSpatialPolygons(x, y, returnList)
   11.           └─sp:::pointsInPolys2(...)
  ── Error (test-getSpatialData.R:27:3): returns a dataframe ─────────────────────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_is(...) test-getSpatialData.R:27:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getSpatialData(120, -17, SimpleCountries)
    5.   ├─sp::over(location, SPDF)
    6.   └─sp::over(location, SPDF)
    7.     └─sp:::.local(x, y, returnList, fn, ...)
    8.       ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
    9.       └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp:::pointsInSpatialPolygons(x, y, returnList)
   11.           └─sp:::pointsInPolys2(...)
  ── Error (test-getTimezone.R:5:3): get functions return correct name ───────────
  Error: nr == length(x) is not TRUE
  Backtrace:
       █
    1. ├─testthat::expect_match(getTimezone(2, 47), "Europe/Paris") test-getTimezone.R:5:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getTimezone(2, 47)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::.invert(r, length(y), length(x))
   12.             └─base::stopifnot(nr == length(x))
  ── Error (test-getTimezone.R:11:3): subsetting with countryCodes works ─────────
  Error: nr == length(x) is not TRUE
  Backtrace:
       █
    1. ├─testthat::expect_match(getTimezone(2, 47), "Europe/Paris") test-getTimezone.R:11:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getTimezone(2, 47)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::.invert(r, length(y), length(x))
   12.             └─base::stopifnot(nr == length(x))
  ── Error (test-getTimezone.R:17:3): allData returns are correct dimension and type ──
  Error: nr == length(x) is not TRUE
  Backtrace:
       █
    1. ├─testthat::expect_s3_class(...) test-getTimezone.R:17:2
    2. │ └─testthat::quasi_label(enquo(object), arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getTimezone(2, 47, allData = TRUE)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::.invert(r, length(y), length(x))
   12.             └─base::stopifnot(nr == length(x))
  ── Error (test-getVariable.R:12:3): returns correct name ───────────────────────
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_match(...) test-getVariable.R:12:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getVariable(...)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-getVariable.R:29:3): allData returns are correct dimension and type ──
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─testthat::expect_s3_class(...) test-getVariable.R:29:2
    2. │ └─testthat::quasi_label(enquo(object), arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─MazamaSpatialUtils::getVariable(...)
    5.   └─MazamaSpatialUtils::getSpatialData(...)
    6.     ├─sp::over(location, SPDF)
    7.     └─sp::over(location, SPDF)
    8.       └─sp:::.local(x, y, returnList, fn, ...)
    9.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   10.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   11.           └─sp:::pointsInSpatialPolygons(x, y, returnList)
   12.             └─sp:::pointsInPolys2(...)
  ── Error (test-summarizePolygons.R:6:3): summarizeByPolygon properly summarizes ──
  Error: replacement has length zero
  Backtrace:
       █
    1. ├─MazamaSpatialUtils::summarizeByPolygon(...) test-summarizePolygons.R:6:2
    2. │ ├─`%>%`(...)
    3. │ └─MazamaSpatialUtils::getSpatialData(...)
    4. │   ├─sp::over(location, SPDF)
    5. │   └─sp::over(location, SPDF)
    6. │     └─sp:::.local(x, y, returnList, fn, ...)
    7. │       ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
    8. │       └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
    9. │         └─sp:::pointsInSpatialPolygons(x, y, returnList)
   10. │           └─sp:::pointsInPolys2(...)
   11. └─dplyr::pull(., .data$polygonID)
  
  [ FAIL 19 | WARN 0 | SKIP 26 | PASS 43 ]
  Error: Test failures
  Execution halted