Running ‘testthat.R’ [125s/349s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > 
  > library(testthat)
  > library(lidR)
  > test_check("lidR")
  Tests using raster: terra 
  Tests using future: TRUE 
  Tests using OpenMP thread: 1 
  OGR: Unsupported geometry type
  OGR: Unsupported geometry type
  [ FAIL 13 | WARN 10 | SKIP 40 | PASS 1340 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (40)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-engine_chunks.R:313'): catalog_makecluster makes correct clusters that do not overlap ──
  Error in `(function (file = if (onefile) "Rplots.pdf" else "Rplot%03d.pdf", 
      width, height, onefile, family, title, fonts, version, paper, 
      encoding, bg, fg, pointsize, pagecentre, colormodel, useDingbats, 
      useKerning, fillOddEven, compress) 
  {
      initPSandPDFfonts()
      new <- list()
      if (!missing(width)) 
          new$width <- width
      if (!missing(height)) 
          new$height <- height
      if (!missing(onefile)) 
          new$onefile <- onefile
      if (!missing(title)) 
          new$title <- title
      if (!missing(fonts)) 
          new$fonts <- fonts
      if (!missing(version)) 
          new$version <- version
      if (!missing(paper)) 
          new$paper <- paper
      if (!missing(encoding)) 
          new$encoding <- encoding
      if (!missing(bg)) 
          new$bg <- bg
      if (!missing(fg)) 
          new$fg <- fg
      if (!missing(pointsize)) 
          new$pointsize <- pointsize
      if (!missing(pagecentre)) 
          new$pagecentre <- pagecentre
      if (!missing(colormodel)) 
          new$colormodel <- colormodel
      if (!missing(useDingbats)) 
          new$useDingbats <- useDingbats
      if (!missing(useKerning)) 
          new$useKerning <- useKerning
      if (!missing(fillOddEven)) 
          new$fillOddEven <- fillOddEven
      if (!missing(compress)) 
          new$compress <- compress
      old <- check.options(new, name.opt = ".PDF.Options", envir = .PSenv)
      if (!missing(family) && (inherits(family, "Type1Font") || 
          inherits(family, "CIDFont"))) {
          enc <- family$encoding
          if (inherits(family, "Type1Font") && !is.null(enc) && 
              enc != "default" && (is.null(old$encoding) || old$encoding == 
              "default")) 
              old$encoding <- enc
          family <- family$metrics
      }
      if (is.null(old$encoding) || old$encoding == "default") 
          old$encoding <- guessEncoding()
      if (!missing(family)) {
          if (length(family) == 4L) {
              family <- c(family, "Symbol.afm")
          }
          else if (length(family) == 5L) {
          }
          else if (length(family) == 1L) {
              pf <- pdfFonts(family)[[1L]]
              if (is.null(pf)) 
                  stop(gettextf("unknown family '%s'", family), 
                    domain = NA)
              matchFont(pf, old$encoding)
          }
          else stop("invalid 'family' argument")
          old$family <- family
      }
      version <- old$version
      versions <- c("1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", 
          "2.0")
      if (version %in% versions) 
          version <- as.integer(strsplit(version, "[.]")[[1L]])
      else stop("invalid PDF version")
      onefile <- old$onefile
      if (!checkIntFormat(file)) 
          stop(gettextf("invalid 'file' argument '%s'", file), 
              domain = NA)
      .External(C_PDF, file, old$paper, old$family, old$encoding, 
          old$bg, old$fg, old$width, old$height, old$pointsize, 
          onefile, old$pagecentre, old$title, old$fonts, version[1L], 
          version[2L], old$colormodel, old$useDingbats, old$useKerning, 
          old$fillOddEven, old$compress)
      invisible()
  })()`: failed to load default encoding
  Backtrace:
      ▆
   1. ├─lidR::engine_chunks(project) at test-engine_chunks.R:313:2
   2. │ └─lidR:::plot.LAScatalog(...)
   3. │   └─graphics::par(mar = c(2.5, 2.5, 1, 1) + 0.1)
   4. └─grDevices (local) `<fn>`()
  ── Failure ('test-engine_chunks.R:331'): plot overlaps works ───────────────────
  `plot(ctg, overlaps = TRUE)` threw an error.
  Message: failed to load default encoding
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(plot(ctg, overlaps = TRUE), NA) at test-engine_chunks.R:331:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─base::plot(ctg, overlaps = TRUE)
    7. ├─lidR::plot(ctg, overlaps = TRUE)
    8. │ └─lidR (local) .local(x, y = y, ...)
    9. │   └─lidR:::plot.LAScatalog(...)
   10. │     └─graphics::par(mar = c(2.5, 2.5, 1, 1) + 0.1)
   11. └─grDevices (local) `<fn>`()
  ── Error ('test-normalize_intensity.R:4'): (code run outside of `test_that()`) ──
  Error in `solve.default(S, C)`: LAPACK routines cannot be loaded
  Backtrace:
      ▆
   1. ├─lidR::track_sensor(las, Roussel2020(pmin = 15)) at test-normalize_intensity.R:4:0
   2. ├─lidR:::track_sensor.LAS(las, Roussel2020(pmin = 15))
   3. │ └─lidR (local) algorithm(data)
   4. │   ├─...[]
   5. │   └─data.table:::`[.data.table`(...)
   6. └─lidR:::sensor_positions(X, Y, Z, ReturnNumber)
   7.   ├─base::t(solve(S, C))
   8.   ├─base::solve(S, C)
   9.   └─base::solve.default(S, C)
  ── Failure ('test-plot.R:64'): plot LASheader works ────────────────────────────
  `plot(las@header)` threw an error.
  Message: failed to load default encoding
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(plot(las@header), NA) at test-plot.R:64:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─base::plot(las@header)
    7. ├─lidR::plot(las@header)
    8. │ └─lidR (local) .local(x, y = y, ...)
    9. │   └─lidR:::plot.LAScatalog(res, mapview = mapview, ...)
   10. │     └─graphics::par(mar = c(2.5, 2.5, 1, 1) + 0.1)
   11. └─grDevices (local) `<fn>`()
  ── Failure ('test-plot.R:68'): Plot LAScatalog object works ────────────────────
  `plot(ctg)` threw an error.
  Message: failed to load default encoding
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(plot(ctg), NA) at test-plot.R:68:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─base::plot(ctg)
    7. ├─lidR::plot(ctg)
    8. │ └─lidR (local) .local(x, y = y, ...)
    9. │   └─lidR:::plot.LAScatalog(...)
   10. │     └─graphics::par(mar = c(2.5, 2.5, 1, 1) + 0.1)
   11. └─grDevices (local) `<fn>`()
  ── Failure ('test-plot.R:69'): Plot LAScatalog object works ────────────────────
  `plot(ctg, chunk = TRUE)` threw an error.
  Message: failed to load default encoding
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(plot(ctg, chunk = TRUE), NA) at test-plot.R:69:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─base::plot(ctg, chunk = TRUE)
    7. ├─lidR::plot(ctg, chunk = TRUE)
    8. │ └─lidR (local) .local(x, y = y, ...)
    9. │   └─lidR:::plot.LAScatalog(...)
   10. │     └─lidR::engine_chunks(x)
   11. │       └─lidR:::plot.LAScatalog(...)
   12. │         └─graphics::par(mar = c(2.5, 2.5, 1, 1) + 0.1)
   13. └─grDevices (local) `<fn>`()
  ── Failure ('test-plot.R:70'): Plot LAScatalog object works ────────────────────
  `plot(ctg, col = "red")` threw an error.
  Message: failed to load default encoding
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(plot(ctg, col = "red"), NA) at test-plot.R:70:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─base::plot(ctg, col = "red")
    7. ├─lidR::plot(ctg, col = "red")
    8. │ └─lidR (local) .local(x, y = y, ...)
    9. │   └─lidR:::plot.LAScatalog(...)
   10. │     └─graphics::par(mar = c(2.5, 2.5, 1, 1) + 0.1)
   11. └─grDevices (local) `<fn>`()
  ── Failure ('test-plot.R:71'): Plot LAScatalog object works ────────────────────
  `plot(ctg@data["Min.Z"])` threw an error.
  Message: failed to load default encoding
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(plot(ctg@data["Min.Z"]), NA) at test-plot.R:71:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─base::plot(ctg@data["Min.Z"])
    7. ├─base::plot(ctg@data["Min.Z"])
    8. ├─sf:::plot.sf(ctg@data["Min.Z"])
    9. │ └─graphics::par()
   10. └─grDevices (local) `<fn>`()
  ── Error ('test-print.R:56'): print works with LAScluster ──────────────────────
  Error in `(function (file = if (onefile) "Rplots.pdf" else "Rplot%03d.pdf", 
      width, height, onefile, family, title, fonts, version, paper, 
      encoding, bg, fg, pointsize, pagecentre, colormodel, useDingbats, 
      useKerning, fillOddEven, compress) 
  {
      initPSandPDFfonts()
      new <- list()
      if (!missing(width)) 
          new$width <- width
      if (!missing(height)) 
          new$height <- height
      if (!missing(onefile)) 
          new$onefile <- onefile
      if (!missing(title)) 
          new$title <- title
      if (!missing(fonts)) 
          new$fonts <- fonts
      if (!missing(version)) 
          new$version <- version
      if (!missing(paper)) 
          new$paper <- paper
      if (!missing(encoding)) 
          new$encoding <- encoding
      if (!missing(bg)) 
          new$bg <- bg
      if (!missing(fg)) 
          new$fg <- fg
      if (!missing(pointsize)) 
          new$pointsize <- pointsize
      if (!missing(pagecentre)) 
          new$pagecentre <- pagecentre
      if (!missing(colormodel)) 
          new$colormodel <- colormodel
      if (!missing(useDingbats)) 
          new$useDingbats <- useDingbats
      if (!missing(useKerning)) 
          new$useKerning <- useKerning
      if (!missing(fillOddEven)) 
          new$fillOddEven <- fillOddEven
      if (!missing(compress)) 
          new$compress <- compress
      old <- check.options(new, name.opt = ".PDF.Options", envir = .PSenv)
      if (!missing(family) && (inherits(family, "Type1Font") || 
          inherits(family, "CIDFont"))) {
          enc <- family$encoding
          if (inherits(family, "Type1Font") && !is.null(enc) && 
              enc != "default" && (is.null(old$encoding) || old$encoding == 
              "default")) 
              old$encoding <- enc
          family <- family$metrics
      }
      if (is.null(old$encoding) || old$encoding == "default") 
          old$encoding <- guessEncoding()
      if (!missing(family)) {
          if (length(family) == 4L) {
              family <- c(family, "Symbol.afm")
          }
          else if (length(family) == 5L) {
          }
          else if (length(family) == 1L) {
              pf <- pdfFonts(family)[[1L]]
              if (is.null(pf)) 
                  stop(gettextf("unknown family '%s'", family), 
                    domain = NA)
              matchFont(pf, old$encoding)
          }
          else stop("invalid 'family' argument")
          old$family <- family
      }
      version <- old$version
      versions <- c("1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", 
          "2.0")
      if (version %in% versions) 
          version <- as.integer(strsplit(version, "[.]")[[1L]])
      else stop("invalid PDF version")
      onefile <- old$onefile
      if (!checkIntFormat(file)) 
          stop(gettextf("invalid 'file' argument '%s'", file), 
              domain = NA)
      .External(C_PDF, file, old$paper, old$family, old$encoding, 
          old$bg, old$fg, old$width, old$height, old$pointsize, 
          onefile, old$pagecentre, old$title, old$fonts, version[1L], 
          version[2L], old$colormodel, old$useDingbats, old$useKerning, 
          old$fillOddEven, old$compress)
      invisible()
  })()`: failed to load default encoding
  Backtrace:
      ▆
   1. ├─lidR::engine_chunks(ctg) at test-print.R:56:2
   2. │ └─lidR:::plot.LAScatalog(...)
   3. │   └─graphics::par(mar = c(2.5, 2.5, 1, 1) + 0.1)
   4. └─grDevices (local) `<fn>`()
  ── Error ('test-readLAS.R:3'): (code run outside of `test_that()`) ─────────────
  Error in `(function (file = if (onefile) "Rplots.pdf" else "Rplot%03d.pdf", 
      width, height, onefile, family, title, fonts, version, paper, 
      encoding, bg, fg, pointsize, pagecentre, colormodel, useDingbats, 
      useKerning, fillOddEven, compress) 
  {
      initPSandPDFfonts()
      new <- list()
      if (!missing(width)) 
          new$width <- width
      if (!missing(height)) 
          new$height <- height
      if (!missing(onefile)) 
          new$onefile <- onefile
      if (!missing(title)) 
          new$title <- title
      if (!missing(fonts)) 
          new$fonts <- fonts
      if (!missing(version)) 
          new$version <- version
      if (!missing(paper)) 
          new$paper <- paper
      if (!missing(encoding)) 
          new$encoding <- encoding
      if (!missing(bg)) 
          new$bg <- bg
      if (!missing(fg)) 
          new$fg <- fg
      if (!missing(pointsize)) 
          new$pointsize <- pointsize
      if (!missing(pagecentre)) 
          new$pagecentre <- pagecentre
      if (!missing(colormodel)) 
          new$colormodel <- colormodel
      if (!missing(useDingbats)) 
          new$useDingbats <- useDingbats
      if (!missing(useKerning)) 
          new$useKerning <- useKerning
      if (!missing(fillOddEven)) 
          new$fillOddEven <- fillOddEven
      if (!missing(compress)) 
          new$compress <- compress
      old <- check.options(new, name.opt = ".PDF.Options", envir = .PSenv)
      if (!missing(family) && (inherits(family, "Type1Font") || 
          inherits(family, "CIDFont"))) {
          enc <- family$encoding
          if (inherits(family, "Type1Font") && !is.null(enc) && 
              enc != "default" && (is.null(old$encoding) || old$encoding == 
              "default")) 
              old$encoding <- enc
          family <- family$metrics
      }
      if (is.null(old$encoding) || old$encoding == "default") 
          old$encoding <- guessEncoding()
      if (!missing(family)) {
          if (length(family) == 4L) {
              family <- c(family, "Symbol.afm")
          }
          else if (length(family) == 5L) {
          }
          else if (length(family) == 1L) {
              pf <- pdfFonts(family)[[1L]]
              if (is.null(pf)) 
                  stop(gettextf("unknown family '%s'", family), 
                    domain = NA)
              matchFont(pf, old$encoding)
          }
          else stop("invalid 'family' argument")
          old$family <- family
      }
      version <- old$version
      versions <- c("1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", 
          "2.0")
      if (version %in% versions) 
          version <- as.integer(strsplit(version, "[.]")[[1L]])
      else stop("invalid PDF version")
      onefile <- old$onefile
      if (!checkIntFormat(file)) 
          stop(gettextf("invalid 'file' argument '%s'", file), 
              domain = NA)
      .External(C_PDF, file, old$paper, old$family, old$encoding, 
          old$bg, old$fg, old$width, old$height, old$pointsize, 
          onefile, old$pagecentre, old$title, old$fonts, version[1L], 
          version[2L], old$colormodel, old$useDingbats, old$useKerning, 
          old$fillOddEven, old$compress)
      invisible()
  })()`: failed to load default encoding
  Backtrace:
      ▆
   1. ├─lidR::engine_chunks(ctg) at test-readLAS.R:3:0
   2. │ └─lidR:::plot.LAScatalog(...)
   3. │   └─graphics::par(mar = c(2.5, 2.5, 1, 1) + 0.1)
   4. └─grDevices (local) `<fn>`()
  ── Error ('test-track_sensor.R:12'): track_sensor works with Roussel2020 ───────
  Error in `solve.default(S, C)`: LAPACK routines cannot be loaded
  Backtrace:
      ▆
   1. ├─lidR::track_sensor(las, Roussel2020(pmin = 10)) at test-track_sensor.R:12:2
   2. ├─lidR:::track_sensor.LAS(las, Roussel2020(pmin = 10))
   3. │ └─lidR (local) algorithm(data)
   4. │   ├─...[]
   5. │   └─data.table:::`[.data.table`(...)
   6. └─lidR:::sensor_positions(X, Y, Z, ReturnNumber)
   7.   ├─base::t(solve(S, C))
   8.   ├─base::solve(S, C)
   9.   └─base::solve.default(S, C)
  ── Error ('test-track_sensor.R:71'): track_sensor handle errors ────────────────
  Error in `solve.default(S, C)`: LAPACK routines cannot be loaded
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-track_sensor.R:71:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─lidR::track_sensor(las2, Roussel2020(pmin = 15), thin_pulse_with_time = 0)
    7. ├─lidR:::track_sensor.LAS(las2, Roussel2020(pmin = 15), thin_pulse_with_time = 0)
    8. │ └─lidR (local) algorithm(data)
    9. │   ├─...[]
   10. │   └─data.table:::`[.data.table`(...)
   11. └─lidR:::sensor_positions(X, Y, Z, ReturnNumber)
   12.   ├─base::t(solve(S, C))
   13.   ├─base::solve(S, C)
   14.   └─base::solve.default(S, C)
  ── Error ('test-track_sensor.R:78'): track_sensor filter duplicates ────────────
  Error in `solve.default(S, C)`: LAPACK routines cannot be loaded
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-track_sensor.R:78:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─lidR::track_sensor(las, Roussel2020(pmin = 10))
    7. ├─lidR:::track_sensor.LAS(las, Roussel2020(pmin = 10))
    8. │ └─lidR (local) algorithm(data)
    9. │   ├─...[]
   10. │   └─data.table:::`[.data.table`(...)
   11. └─lidR:::sensor_positions(X, Y, Z, ReturnNumber)
   12.   ├─base::t(solve(S, C))
   13.   ├─base::solve(S, C)
   14.   └─base::solve.default(S, C)
  
  [ FAIL 13 | WARN 10 | SKIP 40 | PASS 1340 ]
  Error: Test failures
  Execution halted