- using R Under development (unstable) (2025-12-18 r89199)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-15 (Debian 15.2.0-11) 15.2.0
GNU Fortran (Debian 15.2.0-11) 15.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘lidR/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘lidR’ version ‘4.2.2’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [2s/3s] OK
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘lidR’ can be installed ... OK
See the install log for details.
- used C++ compiler: ‘g++-15 (Debian 15.2.0-11) 15.2.0’
- checking C++ specification ... OK
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [5s/6s] OK
- checking whether the package can be loaded with stated dependencies ... [5s/6s] OK
- checking whether the package can be unloaded cleanly ... [5s/6s] OK
- checking whether the namespace can be loaded with stated dependencies ... [4s/5s] OK
- checking whether the namespace can be unloaded cleanly ... [4s/5s] OK
- checking loading without being on the library search path ... [4s/5s] OK
- checking whether startup messages can be suppressed ... [4s/5s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [40s/46s] OK
- checking Rd files ... [1s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking compilation flags in Makevars ... OK
- checking for GNU extensions in Makefiles ... OK
- checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
- checking use of PKG_*FLAGS in Makefiles ... OK
- checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compilation flags used ... OK
- checking compiled code ... NOTE
File ‘lidR/libs/lidR.so’:
Found non-API call to R: ‘ATTRIB’
Compiled code should not call non-API entry points in R.
See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [6s/6s] ERROR
Running examples in ‘lidR-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: aggregate
> ### Title: Metric derivation at different levels of regularization
> ### Aliases: aggregate cloud_metrics crown_metrics hexagon_metrics
> ### pixel_metrics plot_metrics polygon_metrics template_metrics
> ### voxel_metrics
>
> ### ** Examples
>
> LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
> las <- readLAS(LASfile, filter = "-keep_random_fraction 0.5")
> col <- sf::sf.colors(15)
> fun1 <- ~list(maxz = max(Z))
> fun2 <- ~list(q85 = quantile(Z, probs = 0.85))
>
> set_lidr_threads(1) ; data.table::setDTthreads(1) # for cran only
>
> # ================
> # CLOUD METRICS
> # ================
>
> cloud_metrics(las, .stdmetrics_z)
$zmax
[1] 29.11
$zmean
[1] 13.27629
$zsd
[1] 7.456352
$zskew
[1] -0.4764641
$zkurt
[1] 2.086569
$zentropy
[1] 0.9034754
$pzabovezmean
[1] 57.36855
$pzabove2
[1] 85.71007
$zq5
[1] 0
$zq10
[1] 0.09
$zq15
[1] 2.86
$zq20
[1] 5.79
$zq25
[1] 7.81
$zq30
[1] 9.64
$zq35
[1] 11.21
$zq40
[1] 12.63
$zq45
[1] 13.83
$zq50
[1] 14.91
$zq55
[1] 16
$zq60
[1] 16.89
$zq65
[1] 17.71
$zq70
[1] 18.53
$zq75
[1] 19.3
$zq80
[1] 20.09
$zq85
[1] 20.88
$zq90
[1] 21.79
$zq95
[1] 23.05
$zpcum1
[1] 6.52697
$zpcum2
[1] 12.03731
$zpcum3
[1] 20.22982
$zpcum4
[1] 30.04461
$zpcum5
[1] 43.09585
$zpcum6
[1] 59.87833
$zpcum7
[1] 80.14871
$zpcum8
[1] 95.21968
$zpcum9
[1] 99.55928
>
> # ================
> # PIXEL METRICS
> # ================
>
> m <- pixel_metrics(las, fun1, 20)
> #plot(m, col = col)
>
> # ================
> # PLOT METRICS
> # ================
>
> shpfile <- system.file("extdata", "efi_plot.shp", package="lidR")
> inventory <- sf::st_read(shpfile, quiet = TRUE)
> inventory # contains an ID and a Value Of Interest (VOI) per plot
Simple feature collection with 5 features and 2 fields
Geometry type: POINT
Dimension: XY
Bounding box: xmin: 684838.9 ymin: 5017796 xmax: 684976.6 ymax: 5017958
Projected CRS: NAD83 / UTM zone 17N
IDPEP VOI geometry
1 PEPQ1 14.157140 POINT (684976.6 5017821)
2 PEPQ2 12.720584 POINT (684923.9 5017958)
3 PEPQ3 11.396656 POINT (684838.9 5017942)
4 PEPQ4 11.597471 POINT (684855 5017891)
5 PEPQ5 8.263425 POINT (684944 5017796)
>
> m <- plot_metrics(las, fun2, inventory, radius = 11.28)
> #plot(header(las))
> #plot(m["q85"], pch = 19, cex = 3, add = TRUE)
>
>
> # ================
> # VOXEL METRICS
> # ================
>
> m <- voxel_metrics(las, length(Z), 8)
Error in `[.data.table`(by, , `:=`(GRP, .GRP), by = c("Xgrid", "Ygrid", :
attempt access index 3/3 in VECTOR_ELT
Calls: voxel_metrics -> [ -> [.data.table
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [102s/115s] ERROR
Running ‘testthat.R’ [102s/114s]
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
Tests using rlas: 1.8.2
OGR: Unsupported geometry type
OGR: Unsupported geometry type
Chunk 1 of 1 (100%): state ✓
Saving _problems/test-metrics_voxels-5.R
Saving _problems/test-metrics_voxels-14.R
Saving _problems/test-metrics_voxels-23.R
[ FAIL 3 | WARN 0 | SKIP 46 | PASS 1289 ]
══ Skipped tests (46) ══════════════════════════════════════════════════════════
• On CRAN (41): 'test-apply_automerge.R:99:3', 'test-apply_automerge.R:163:3',
'test-apply_automerge.R:183:3', 'test-apply_automerge.R:196:3',
'test-apply_automerge.R:217:3', 'test-apply_automerge.R:229:3',
'test-apply_automerge.R:263:3', 'test-apply_automerge.R:274:3',
'test-apply_automerge.R:320:3', 'test-apply_automerge.R:335:3',
'test-apply_autoread.R:3:3', 'test-apply_generic.R:22:3',
'test-apply_generic.R:108:3', 'test-catalog_laxindex.R:4:3',
'test-classify_ground.R:62:3', 'test-classify_poi.R:21:3',
'test-concaveman.R:15:3', 'test-concaveman.R:64:3',
'test-fullwaveform.R:2:3', 'test-generic_local_maximum.R:2:3',
'test-metrics_crowns.R:31:3', 'test-metrics_crowns.R:112:3',
'test-metrics_crowns.R:122:3', 'test-plot.R:7:3', 'test-plot.R:15:3',
'test-plot.R:49:3', 'test-plot.R:73:3', 'test-plot.R:79:3',
'test-plot.R:86:3', 'test-plot.R:93:3', 'test-plot.R:100:3',
'test-plot.R:107:3', 'test-plot.R:118:3', 'test-projection.R:82:3',
'test-projection.R:107:3', 'test-rasterize_canopy.R:66:3',
'test-rasterize_terrain.R:145:3', 'test-segment_snags.R:27:2',
'test-segment_trees.R:73:3', 'test-track_sensor.R:45:3',
'test-voxelize_points.R:15:3'
• Point metrics disable (1): 'test-segment_shape.R:51:3'
• Point metrics disabled (1): 'test-metrics_points.R:9:1'
• empty test (3): , ,
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-metrics_voxels.R:5:3'): voxel_metrics returns a named data.frame ──
Error in ``[.data.table`(by, , `:=`(GRP, .GRP), by = c("Xgrid", "Ygrid", "Zgrid"))`: attempt access index 3/3 in VECTOR_ELT
Backtrace:
▆
1. └─lidR::voxel_metrics(las, list(Imean = mean(Intensity)), 5) at test-metrics_voxels.R:5:3
2. ├─by[, `:=`(GRP, .GRP), by = c("Xgrid", "Ygrid", "Zgrid")]
3. └─data.table:::`[.data.table`(...)
── Error ('test-metrics_voxels.R:14:3'): voxel_metrics works with all_voxels ───
Error in ``[.data.table`(by, , `:=`(GRP, .GRP), by = c("Xgrid", "Ygrid", "Zgrid"))`: attempt access index 3/3 in VECTOR_ELT
Backtrace:
▆
1. └─lidR::voxel_metrics(las, list(Imean = mean(Intensity)), 5, all_voxels = TRUE) at test-metrics_voxels.R:14:3
2. ├─by[, `:=`(GRP, .GRP), by = c("Xgrid", "Ygrid", "Zgrid")]
3. └─data.table:::`[.data.table`(...)
── Error ('test-metrics_voxels.R:23:3'): voxel_metrics accepts both an expression or a formula ──
Error in ``[.data.table`(by, , `:=`(GRP, .GRP), by = c("Xgrid", "Ygrid", "Zgrid"))`: attempt access index 3/3 in VECTOR_ELT
Backtrace:
▆
1. └─lidR::voxel_metrics(las, list(Imean = mean(Intensity)), 5) at test-metrics_voxels.R:23:3
2. ├─by[, `:=`(GRP, .GRP), by = c("Xgrid", "Ygrid", "Zgrid")]
3. └─data.table:::`[.data.table`(...)
[ FAIL 3 | WARN 0 | SKIP 46 | PASS 1289 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [38s/51s] OK
- checking PDF version of manual ... [7s/10s] OK
- checking HTML version of manual ... [6s/8s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs, 1 NOTE