Running ‘testthat.R’ [33s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(withr)
  > library(PiC)
  > 
  > test_check("PiC")
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  Joining with `by = join_by(u, v)`
  Joining with `by = join_by(cls)`
  Joining with `by = join_by(u, v, w)`
  Joining with `by = join_by(u, v, w)`
  Joining with `by = join_by(u, v, w)`
  Joining with `by = join_by(u, v, w)`
  File Forest_floor:/tmp/RtmpLva93s/test_forest/Forest_floor.txt
  
  File AGB:/tmp/RtmpLva93s/test_forest/AGB.txt
  
  Forest Floor segmentation: 2.996 sec elapsed
  Percorso del file Forest_floor: /tmp/RtmpLva93s/test_forest/Forest_floor.txt 
  Percorso del file AGB: /tmp/RtmpLva93s/test_forest/AGB.txt 
  Stage 1: Forest floor segmentation
  Forest floor saved to: /tmp/RtmpLva93s/test_forest_seg/test_forest_dim3_th1_Forest_floor_soil_dim_0.1.txt
  Stage 2: Wood segmentation
  Wood points saved to: /tmp/RtmpLva93s/test_forest_seg/test_forest_dim3_th1_Wood_eps2_mpts6.txt
  Stage 3: Separating foliage from wood
  Foliage points saved to: /tmp/RtmpLva93s/test_forest_seg/test_forest_dim3_th1_AGBnoWOOD_eps2_mpts6.txt
  Stage 4: Calculating tree metrics and canopy analysis
  Calculating individual tree coordinates...
  Calculating tree heights...
  Saving _problems/test-Forest_seg-100.R
  ========================================
  SegOne v4.1.1: Single Tree Analysis
  Robust error handling + Adaptive density threshold
  ========================================
  
  --- Analysis Parameters ---
  Input points: 251,363
  Voxel size: 2 cm (0.02 m)
  DBSCAN parameters: eps = 2, minPts = 6
  Minimum cluster size: 200 voxels
  Shape parameter threshold: 30
  Output directory: /tmp/RtmpLva93s/file30c7ab75f7867d
  
  Stage 1/4: Wood segmentation
    Voxelizing point cloud...
      Voxels generated: 151,781
      Running DBSCAN clustering...
      Clusters found: 2 (>200 voxels)
      Applying PCA shape filter (R > 30)...
      Wood clusters accepted: 1 / 1
      Mean shape parameter R: 113.68
    Wood points identified: 192,870
    Wood clusters detected: 1
    Wood file saved: test_tree_dim2_th1_Wood_eps2_mpts6.txt
  
  Stage 2/4: Foliage separation
    Performing voxel-based subtraction...
    Voxelizing at 0.2 m resolution...
    Performing voxel-based subtraction...
    Foliage points identified: 56,301
    Wood/foliage ratio: 3.43
  
  Stage 3/4: Metrics calculation skipped (calculate_metrics = FALSE)
  
  Stage 4/4: Analysis completed successfully
  Total time: 2.29 sec elapsed
  
  ========================================
  Output Files Generated:
  1. Wood points: test_tree_dim2_th1_Wood_eps2_mpts6.txt
     -> 192,870 points
  2. Foliage points: test_tree_dim2_th1_AGBnoWOOD_eps2_mpts6.txt
     -> 56,301 points
  ========================================
  
  Voxelizing time: 0.011 sec elapsed
  [ FAIL 1 | WARN 2 | SKIP 7 | PASS 35 ]
  
  ══ Skipped tests (7) ═══════════════════════════════════════════════════════════
  • Could not find shiny app file: global.R (5): 'test-shiny-app.r:32:3',
    'test-shiny-app.r:70:3', 'test-shiny-app.r:85:3', 'test-shiny-app.r:96:3',
    'test-shiny-app.r:116:3'
  • Could not find shiny app file: server.R (1): 'test-shiny-app.r:201:3'
  • Could not find shiny app file: ui.R (1): 'test-shiny-app.r:221:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-Forest_seg.R:88:3'): Forest_seg funziona correttamente con una scena forestale realistica ──
  Expected `Forest_seg(...)` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 3/3 in VECTOR_ELT
  
  [ FAIL 1 | WARN 2 | SKIP 7 | PASS 35 ]
  Error:
  ! Test failures.
  Execution halted