Running ‘testthat.R’ [154s/192s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > 
  > library(testthat)
  > library(lidR)
  Loading required package: raster
  Loading required package: sp
  > 
  > options(lidR.progress = FALSE)
  > rgdal::set_thin_PROJ6_warnings(TRUE)
  > test_check("lidR")
  ── 1. Error: lasmergespatial works with sf (@test-lasmergespatial.R#37)  ───────
  st_crs(x) == st_crs(y) is not TRUE
  Backtrace:
    1. lidR::lasmergespatial(lidar, lakes, "inlakes")
    3. lidR:::merge_spatial.LAS(las, source, attribute)
    5. sf:::st_crop.sf(source, box)
    6. sf:::st_crop.sfc(x, y, ...)
    8. sf:::st_intersection.sf(x, st_as_sfc(y))
   10. sf:::geos_op2_geom("intersection", x, y)
   11. base::stopifnot(st_crs(x) == st_crs(y))
  
  ── 2. Error: lasmergespatial never fails (sf) (@test-lasmergespatial.R#79)  ────
  st_crs(x) == st_crs(y) is not TRUE
  Backtrace:
    1. lidR::lasmergespatial(lidar, lakes)
    3. lidR:::merge_spatial.LAS(las, source, attribute)
    5. sf:::st_crop.sf(source, box)
    6. sf:::st_crop.sfc(x, y, ...)
    8. sf:::st_intersection.sf(x, st_as_sfc(y))
   10. sf:::geos_op2_geom("intersection", x, y)
   11. base::stopifnot(st_crs(x) == st_crs(y))
  
  ── 3. Failure: Quantization works (@test-quantization.R#16)  ───────────────────
  lidR:::fast_countunquantized(x, scale, offset) not equal to 0L.
  1/1 mismatches
  [1] 100 - 0 == 100
  
  ── 4. Failure: Quantization works on las data (@test-quantization.R#29)  ───────
  lidR:::fast_countunquantized(las$X, xscale, xoffset) not equal to 0L.
  1/1 mismatches
  [1] 81590 - 0 == 81590
  
  ── 5. Failure: Quantization works on las data (@test-quantization.R#30)  ───────
  lidR:::fast_countunquantized(las$Y, yscale, yoffset) not equal to 0L.
  1/1 mismatches
  [1] 81590 - 0 == 81590
  
  ── 6. Failure: Quantization works on las data (@test-quantization.R#31)  ───────
  lidR:::fast_countunquantized(las$Z, zscale, zoffset) not equal to 0L.
  1/1 mismatches
  [1] 73567 - 0 == 73567
  
  ── 7. Failure: Quantization works on las data (@test-quantization.R#36)  ───────
  lidR:::fast_countunquantized(las$X, xscale, xoffset) not equal to 1L.
  1/1 mismatches
  [1] 81590 - 1 == 81589
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 1146 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 7 ]
  1. Error: lasmergespatial works with sf (@test-lasmergespatial.R#37) 
  2. Error: lasmergespatial never fails (sf) (@test-lasmergespatial.R#79) 
  3. Failure: Quantization works (@test-quantization.R#16) 
  4. Failure: Quantization works on las data (@test-quantization.R#29) 
  5. Failure: Quantization works on las data (@test-quantization.R#30) 
  6. Failure: Quantization works on las data (@test-quantization.R#31) 
  7. Failure: Quantization works on las data (@test-quantization.R#36) 
  
  Error: testthat unit tests failed
  Execution halted