Running ‘testthat.R’ [33s/52s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(exactextractr)
  > 
  > test_check("exactextractr")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_coverage_fraction.R:29:3): Coverage fraction function works ─────
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_coverage_fraction(x, wkb, crop)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::coverage_fraction(rast, square) test_coverage_fraction.R:29:2
   2. └─exactextractr::coverage_fraction(rast, square)
   3.   └─exactextractr:::.local(x, y, crop, ...)
   4.     └─base::lapply(...)
   5.       └─exactextractr:::FUN(X[[i]], ...)
   6.         └─exactextractr:::CPP_coverage_fraction(x, wkb, crop)
  ── Error (test_coverage_fraction.R:49:3): Output can be cropped to the extent of the input feature ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_coverage_fraction(x, wkb, crop)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::coverage_fraction(rast, square, crop = TRUE) test_coverage_fraction.R:49:2
   2. └─exactextractr::coverage_fraction(rast, square, crop = TRUE)
   3.   └─exactextractr:::.local(x, y, crop, ...)
   4.     └─base::lapply(...)
   5.       └─exactextractr:::FUN(X[[i]], ...)
   6.         └─exactextractr:::CPP_coverage_fraction(x, wkb, crop)
  ── Error (test_coverage_fraction.R:66:3): When output is not cropped, cells outside of the processed area are 0, not NA ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_coverage_fraction(x, wkb, crop)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::coverage_fraction(rast, square, crop = TRUE) test_coverage_fraction.R:66:2
   2. └─exactextractr::coverage_fraction(rast, square, crop = TRUE)
   3.   └─exactextractr:::.local(x, y, crop, ...)
   4.     └─base::lapply(...)
   5.       └─exactextractr:::FUN(X[[i]], ...)
   6.         └─exactextractr:::CPP_coverage_fraction(x, wkb, crop)
  ── Error (test_coverage_fraction.R:78:3): Raster returned by coverage_fraction has same properties as the input ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_coverage_fraction(x, wkb, crop)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::coverage_fraction(r, p) test_coverage_fraction.R:78:2
   2. └─exactextractr::coverage_fraction(r, p)
   3.   └─exactextractr:::.local(x, y, crop, ...)
   4.     └─base::lapply(...)
   5.       └─exactextractr:::FUN(X[[i]], ...)
   6.         └─exactextractr:::CPP_coverage_fraction(x, wkb, crop)
  ── Error (test_coverage_fraction.R:95:3): Coverage fractions are exact ─────────
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_coverage_fraction(x, wkb, crop)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::coverage_fraction(r, p) test_coverage_fraction.R:95:2
   2. └─exactextractr::coverage_fraction(r, p)
   3.   └─exactextractr:::.local(x, y, crop, ...)
   4.     └─base::lapply(...)
   5.       └─exactextractr:::FUN(X[[i]], ...)
   6.         └─exactextractr:::CPP_coverage_fraction(x, wkb, crop)
  ── Error (test_coverage_fraction.R:113:3): Warning is raised on CRS mismatch ───
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_coverage_fraction(x, wkb, crop)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
       █
    1. ├─testthat::expect_warning(coverage_fraction(rast, poly), "transformed to raster") test_coverage_fraction.R:113:2
    2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─exactextractr::coverage_fraction(rast, poly)
    7. └─exactextractr::coverage_fraction(rast, poly)
    8.   └─exactextractr:::.local(x, y, crop, ...)
    9.     └─base::lapply(...)
   10.       └─exactextractr:::FUN(X[[i]], ...)
   11.         └─exactextractr:::CPP_coverage_fraction(x, wkb, crop)
  ── Error (test_coverage_fraction.R:124:3): Warning is raised on undefined CRS ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_coverage_fraction(x, wkb, crop)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
       █
    1. ├─testthat::expect_silent(coverage_fraction(rast, poly)) test_coverage_fraction.R:124:2
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat:::.capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─exactextractr::coverage_fraction(rast, poly)
   10. └─exactextractr::coverage_fraction(rast, poly)
   11.   └─exactextractr:::.local(x, y, crop, ...)
   12.     └─base::lapply(...)
   13.       └─exactextractr:::FUN(X[[i]], ...)
   14.         └─exactextractr:::CPP_coverage_fraction(x, wkb, crop)
  ── Error (test_coverage_fraction.R:149:3): Z dimension is ignored, if present ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_coverage_fraction(x, wkb, crop)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test_coverage_fraction.R:149:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─exactextractr::coverage_fraction(values, poly)
   5. └─exactextractr::coverage_fraction(values, poly)
   6.   └─exactextractr:::.local(x, y, crop, ...)
   7.     └─base::lapply(...)
   8.       └─exactextractr:::FUN(X[[i]], ...)
   9.         └─exactextractr:::CPP_coverage_fraction(x, wkb, crop)
  ── Error (test_exact_extract.R:195:3): We ignore portions of the polygon that extend outside the raster ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_extract(rast, rect, include_xy = TRUE) test_exact_extract.R:195:2
   2. └─exactextractr::exact_extract(rast, rect, include_xy = TRUE)
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─base::lapply(...)
   7.       └─exactextractr:::FUN(X[[i]], ...)
   8.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract.R:363:3): We get acceptable default values when processing a polygon that does
             not intersect the raster ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
       █
    1. ├─testthat::expect_equal(...) test_exact_extract.R:363:2
    2. │ └─testthat::quasi_label(enquo(expected), expected.label, arg = "expected")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─exactextractr::exact_extract(rast, poly, include_xy = TRUE, include_cell = TRUE)
    5. └─exactextractr::exact_extract(rast, poly, include_xy = TRUE, include_cell = TRUE)
    6.   └─exactextractr:::.local(x, y, ...)
    7.     ├─base::tryCatch(...)
    8.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
    9.     └─base::lapply(...)
   10.       └─exactextractr:::FUN(X[[i]], ...)
   11.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract.R:532:3): Weighted stats work when polygon is contained in weight raster but
            only partially contained in value raster ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_extract(values, poly, include_xy = TRUE) test_exact_extract.R:532:2
   2. └─exactextractr::exact_extract(values, poly, include_xy = TRUE)
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─base::lapply(...)
   7.       └─exactextractr:::FUN(X[[i]], ...)
   8.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract.R:1036:3): All summary function arguments combined when summarize_df = TRUE ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
       █
    1. ├─testthat::expect_null(...) test_exact_extract.R:1036:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─exactextractr::exact_extract(...)
    5. └─exactextractr::exact_extract(...)
    6.   └─exactextractr:::.local(x, y, ...)
    7.     ├─base::tryCatch(...)
    8.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
    9.     └─base::lapply(...)
   10.       └─exactextractr:::FUN(X[[i]], ...)
   11.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract.R:1067:3): floating point errors do not cause an error that
            "logical subsetting requires vectors of identical size" ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_extract(...) test_exact_extract.R:1067:2
   2. └─exactextractr::exact_extract(...)
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─base::lapply(...)
   7.       └─exactextractr:::FUN(X[[i]], ...)
   8.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract_include_args.R:33:3): when include_xy = TRUE, center coordinates area included in the output ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_extract(rast, poly, include_xy = TRUE, include_cell = TRUE) test_exact_extract_include_args.R:33:2
   2. └─exactextractr::exact_extract(rast, poly, include_xy = TRUE, include_cell = TRUE)
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─base::lapply(...)
   7.       └─exactextractr:::FUN(X[[i]], ...)
   8.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract_include_args.R:63:3): We can use the stack_apply argument with include_xy and include_cols ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_extract(...) test_exact_extract_include_args.R:63:2
   2. └─exactextractr::exact_extract(...)
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─base::lapply(...)
   7.       └─exactextractr:::FUN(X[[i]], ...)
   8.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract_include_args.R:82:3): when include_area = TRUE, cell areas are included in output (geographic) and are accurate to 1% ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_extract(...) test_exact_extract_include_args.R:82:2
   2. └─exactextractr::exact_extract(...)
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─base::lapply(...)
   7.       └─exactextractr:::FUN(X[[i]], ...)
   8.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract_include_args.R:119:3): When disaggregating values, xy coordinates refer to disaggregated grid ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_extract(rast2, circle, include_xy = TRUE) test_exact_extract_include_args.R:119:2
   2. └─exactextractr::exact_extract(rast2, circle, include_xy = TRUE)
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─base::lapply(...)
   7.       └─exactextractr:::FUN(X[[i]], ...)
   8.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract_include_args.R:139:3): When value and weighting rasters have different grids, cell numbers refer to value raster ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
       █
    1. ├─base::suppressWarnings(...) test_exact_extract_include_args.R:139:2
    2. │ └─base::withCallingHandlers(...)
    3. ├─exactextractr::exact_extract(anom, circle, weights = pop, include_cell = TRUE) test_exact_extract_include_args.R:140:4
    4. └─exactextractr::exact_extract(anom, circle, weights = pop, include_cell = TRUE)
    5.   └─exactextractr:::.local(x, y, ...)
    6.     ├─base::tryCatch(...)
    7.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
    8.     └─base::lapply(...)
    9.       └─exactextractr:::FUN(X[[i]], ...)
   10.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_extract_include_args.R:163:3): include_ arguments supported with weighted summary function ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_exact_extract(x, weights, wkb, default_value, default_weight, 
      include_xy, include_cell, include_area, area_weights, coverage_area, 
      area_method, include_col_values, value_names, weight_names, 
      warn_on_disaggregate)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_extract(...) test_exact_extract_include_args.R:163:2
   2. └─exactextractr::exact_extract(...)
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─base::lapply(...)
   7.       └─exactextractr:::FUN(X[[i]], ...)
   8.         └─exactextractr:::CPP_exact_extract(...)
  ── Error (test_exact_resample.R:28:3): exact_resample preserves values ─────────
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_resample(x, y, fun)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_resample(src, dst, "sum") test_exact_resample.R:28:2
   2. └─exactextractr::exact_resample(src, dst, "sum")
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─exactextractr:::CPP_resample(x, y, fun)
  ── Error (test_exact_resample.R:77:3): warning raised if one CRS undefined ─────
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_resample(x, y, fun)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
       █
    1. ├─testthat::expect_warning(exact_resample(a, b, "sum"), "No CRS specified for destination") test_exact_resample.R:77:2
    2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─exactextractr::exact_resample(a, b, "sum")
    7. └─exactextractr::exact_resample(a, b, "sum")
    8.   └─exactextractr:::.local(x, y, ...)
    9.     ├─base::tryCatch(...)
   10.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   11.     └─exactextractr:::CPP_resample(x, y, fun)
  ── Error (test_exact_resample.R:98:3): stats requiring stored values can be used ──
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'unique': error in evaluating the argument 'x' in selecting a method for function 'getValues': Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
       █
    1. ├─base::sort(...) test_exact_resample.R:98:2
    2. ├─base::unique(...)
    3. ├─raster::getValues(exactextractr::exact_resample(r, target, fun = "mode"))
    4. ├─exactextractr::exact_resample(r, target, fun = "mode")
    5. ├─exactextractr::exact_resample(r, target, fun = "mode")
    6. │ └─exactextractr:::.local(x, y, ...)
    7. │   ├─base::tryCatch(...)
    8. │   │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
    9. │   └─exactextractr:::CPP_resample(x, y, fun)
   10. ├─base::stop(...)
   11. ├─(function (cond) ...
   12. └─base::.handleSimpleError(...)
   13.   └─base:::h(simpleError(msg, call))
  ── Error (test_exact_resample_terra.R:28:3): exact_resample supports SpatRaster arguments ──
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPP_resample(x, y, fun)`: Cannot convert object to a function: [type=NULL; target=CLOSXP, SPECIALSXP, or BUILTINSXP].
  Backtrace:
      █
   1. ├─exactextractr::exact_resample(src, dst, "sum") test_exact_resample_terra.R:28:2
   2. └─exactextractr::exact_resample(src, dst, "sum")
   3.   └─exactextractr:::.local(x, y, ...)
   4.     ├─base::tryCatch(...)
   5.     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.     └─exactextractr:::CPP_resample(x, y, fun)
  
  [ FAIL 23 | WARN 0 | SKIP 0 | PASS 330 ]
  Error: Test failures
  Execution halted