Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(litteR)
  
  litteR version: 1.0.1
  Type create_litter_project() to create a new project.
  Type vignette("litteR-manual") to open the user manual.
  Open the data file and check the presence of essential column names
  (see manual, Section 4.2).
  Open the settings file and check the settings.
  Type litter() to start litteR.
  > 
  > test_check("litteR")
  2025-09-12 16:45:56 [INFO] Check if required metadata columns 'location_code' and 'date' exist.
  2025-09-12 16:45:56 [INFO] All required columns are available
  2025-09-12 16:45:56 [INFO] Check if optional columns are available.
  2025-09-12 16:45:56 [INFO] No optional columns found.
  2025-09-12 16:45:56 [INFO] Checking date format
  2025-09-12 16:45:56 [INFO] All dates are OSPAR compliant (dd/mm/YYYY)
  2025-09-12 16:45:56 [INFO] Checking consistency of dates
  2025-09-12 16:45:56 [INFO] Dates are consistent. All dates are dd/mm/YYYY
  2025-09-12 16:45:56 [INFO] Check if all litter types in the type file are present in the data file
  2025-09-12 16:45:56 [WARN] The following types in the type file are missing in the data file: 'p: b [2]'
  2025-09-12 16:45:56 [INFO] Select only litter data
  2025-09-12 16:45:56 [WARN] The following columns will be excluded from analysis:'dummy'
  2025-09-12 16:45:56 [INFO] Check for empty cells
  2025-09-12 16:45:56 [INFO] No empty cells found
  2025-09-12 16:45:56 [INFO] Check that litter counts are numbers
  2025-09-12 16:45:56 [INFO] Only numbers found
  2025-09-12 16:45:56 [INFO] Check that litter counts are nonnegative numbers
  2025-09-12 16:45:56 [INFO] No negative numbers found
  2025-09-12 16:45:56 [INFO] Check that litter counts are natural numbers
  2025-09-12 16:45:56 [INFO] Only natural numbers found
  2025-09-12 16:45:56 [INFO] Check if not all litter counts in a single survey (record) are zero
  2025-09-12 16:45:56 [INFO] No records found with only zero-counts
  2025-09-12 16:45:56 [INFO] Check for duplicated records
  2025-09-12 16:45:56 [INFO] No duplicated records found
  2025-09-12 16:45:56 [INFO] No records with the same location_code/date found
  2025-09-12 16:45:56 [INFO] Checking extension of 'test.xyz' (should be 'csv')
  2025-09-12 16:45:56 [ERROR] file 'test.xyz' should have 'csv' as extension.
  2025-09-12 16:45:56 [INFO] Check if required metadata columns 'location_code' and 'date' exist.
  2025-09-12 16:45:56 [INFO] All required columns are available
  2025-09-12 16:45:56 [INFO] Check if optional columns are available.
  2025-09-12 16:45:56 [INFO] No optional columns found.
  2025-09-12 16:45:56 [INFO] Checking date format
  2025-09-12 16:45:56 [INFO] All dates are OSPAR compliant (dd/mm/YYYY)
  2025-09-12 16:45:56 [INFO] Checking consistency of dates
  2025-09-12 16:45:56 [INFO] Dates are consistent. All dates are dd/mm/YYYY
  2025-09-12 16:45:56 [INFO] Check if all litter types in the type file are present in the data file
  2025-09-12 16:45:56 [INFO] All litter types are present
  2025-09-12 16:45:56 [INFO] Select only litter data
  2025-09-12 16:45:56 [INFO] Check for empty cells
  2025-09-12 16:45:56 [ERROR] The following data column(s) contain(s) empty cells:p: a [1]
  2025-09-12 16:45:56 [INFO] Check if required metadata columns 'location_code' and 'date' exist.
  2025-09-12 16:45:56 [INFO] All required columns are available
  2025-09-12 16:45:56 [INFO] Check if optional columns are available.
  2025-09-12 16:45:56 [INFO] No optional columns found.
  2025-09-12 16:45:56 [INFO] Checking date format
  2025-09-12 16:45:56 [INFO] All dates are OSPAR compliant (dd/mm/YYYY)
  2025-09-12 16:45:56 [INFO] Checking consistency of dates
  2025-09-12 16:45:56 [INFO] Dates are consistent. All dates are dd/mm/YYYY
  2025-09-12 16:45:56 [INFO] Check if all litter types in the type file are present in the data file
  2025-09-12 16:45:56 [INFO] All litter types are present
  2025-09-12 16:45:56 [INFO] Select only litter data
  2025-09-12 16:45:56 [INFO] Check for empty cells
  2025-09-12 16:45:56 [INFO] No empty cells found
  2025-09-12 16:45:56 [INFO] Check that litter counts are numbers
  2025-09-12 16:45:56 [INFO] Only numbers found
  2025-09-12 16:45:56 [INFO] Check that litter counts are nonnegative numbers
  2025-09-12 16:45:56 [INFO] No negative numbers found
  2025-09-12 16:45:56 [INFO] Check that litter counts are natural numbers
  2025-09-12 16:45:56 [INFO] Only natural numbers found
  2025-09-12 16:45:56 [INFO] Check if not all litter counts in a single survey (record) are zero
  2025-09-12 16:45:56 [INFO] No records found with only zero-counts
  2025-09-12 16:45:56 [INFO] Check for duplicated records
  2025-09-12 16:45:56 [WARN] The following records are duplicated: 2 and 3. Only the first record of each duplicate will be retained.
  2025-09-12 16:45:56 [INFO] No records with the same location_code/date found
  2025-09-12 16:45:56 [INFO] Check if required metadata columns 'location_code' and 'date' exist.
  2025-09-12 16:45:56 [INFO] All required columns are available
  2025-09-12 16:45:56 [INFO] Check if optional columns are available.
  2025-09-12 16:45:56 [INFO] No optional columns found.
  2025-09-12 16:45:56 [INFO] Checking date format
  2025-09-12 16:45:56 [INFO] All dates are OSPAR compliant (dd/mm/YYYY)
  2025-09-12 16:45:56 [INFO] Checking consistency of dates
  2025-09-12 16:45:56 [INFO] Dates are consistent. All dates are dd/mm/YYYY
  2025-09-12 16:45:56 [INFO] Check if all litter types in the type file are present in the data file
  2025-09-12 16:45:56 [INFO] All litter types are present
  2025-09-12 16:45:56 [INFO] Select only litter data
  2025-09-12 16:45:56 [INFO] Check for empty cells
  2025-09-12 16:45:56 [INFO] No empty cells found
  2025-09-12 16:45:56 [INFO] Check that litter counts are numbers
  2025-09-12 16:45:56 [INFO] Only numbers found
  2025-09-12 16:45:56 [INFO] Check that litter counts are nonnegative numbers
  2025-09-12 16:45:56 [INFO] No negative numbers found
  2025-09-12 16:45:56 [INFO] Check that litter counts are natural numbers
  2025-09-12 16:45:56 [INFO] Only natural numbers found
  2025-09-12 16:45:56 [INFO] Check if not all litter counts in a single survey (record) are zero
  2025-09-12 16:45:56 [INFO] No records found with only zero-counts
  2025-09-12 16:45:56 [INFO] Check for duplicated records
  2025-09-12 16:45:56 [INFO] No duplicated records found
  2025-09-12 16:45:56 [WARN] The following records have different counts for the same `location_code` and `date`:2 and 3. All these records will be retained in the analysis.
  2025-09-12 16:45:56 [INFO] Check if required metadata columns 'location_code' and 'date' exist.
  2025-09-12 16:45:56 [INFO] All required columns are available
  2025-09-12 16:45:56 [INFO] Check if optional columns are available.
  2025-09-12 16:45:56 [INFO] No optional columns found.
  2025-09-12 16:45:56 [INFO] Checking date format
  2025-09-12 16:45:56 [INFO] All dates are ISO 8601 compliant (YYYY-mm-dd)
  2025-09-12 16:45:56 [INFO] Checking consistency of dates
  2025-09-12 16:45:56 [INFO] Dates are consistent. All dates are YYYY-mm-dd
  2025-09-12 16:45:56 [INFO] Check if all litter types in the type file are present in the data file
  2025-09-12 16:45:56 [WARN] The following types in the type file are missing in the data file: 'plastic: yokes [1]'
  2025-09-12 16:45:56 [INFO] Select only litter data
  2025-09-12 16:45:56 [ERROR] No columns with litter data found. See the type file for valid litter types.
  2025-09-12 16:45:57 [INFO] Check if required metadata columns 'location_code' and 'date' exist.
  2025-09-12 16:45:57 [INFO] All required columns are available
  2025-09-12 16:45:57 [INFO] Check if optional columns are available.
  2025-09-12 16:45:57 [INFO] No optional columns found.
  2025-09-12 16:45:57 [INFO] Checking date format
  2025-09-12 16:45:57 [INFO] All dates are ISO 8601 compliant (YYYY-mm-dd)
  2025-09-12 16:45:57 [INFO] Checking consistency of dates
  2025-09-12 16:45:57 [INFO] Dates are consistent. All dates are YYYY-mm-dd
  2025-09-12 16:45:57 [INFO] Check if all litter types in the type file are present in the data file
  2025-09-12 16:45:57 [INFO] All litter types are present
  2025-09-12 16:45:57 [INFO] Select only litter data
  2025-09-12 16:45:57 [INFO] Check for empty cells
  2025-09-12 16:45:57 [INFO] No empty cells found
  2025-09-12 16:45:57 [INFO] Check that litter counts are numbers
  2025-09-12 16:45:57 [INFO] Only numbers found
  2025-09-12 16:45:57 [INFO] Check that litter counts are nonnegative numbers
  2025-09-12 16:45:57 [INFO] No negative numbers found
  2025-09-12 16:45:57 [INFO] Check that litter counts are natural numbers
  2025-09-12 16:45:57 [WARN] Non-natural numbers (i.e., numbers that are not in 0, 1, 2, ...) found in columns:'plastic: yokes [1]'. Please, verify if these numbers are correct.These columns will be included in the analysis.
  2025-09-12 16:45:57 [INFO] Check if not all litter counts in a single survey (record) are zero
  2025-09-12 16:45:57 [INFO] No records found with only zero-counts
  2025-09-12 16:45:57 [INFO] Check for duplicated records
  2025-09-12 16:45:57 [INFO] No duplicated records found
  2025-09-12 16:45:57 [INFO] No records with the same location_code/date found
  2025-09-12 16:45:57 [INFO] Check if required metadata columns 'location_code' and 'date' exist.
  2025-09-12 16:45:57 [INFO] All required columns are available
  2025-09-12 16:45:57 [INFO] Check if optional columns are available.
  2025-09-12 16:45:57 [INFO] No optional columns found.
  2025-09-12 16:45:57 [INFO] Checking date format
  2025-09-12 16:45:57 [INFO] All dates are ISO 8601 compliant (YYYY-mm-dd)
  2025-09-12 16:45:57 [INFO] Checking consistency of dates
  2025-09-12 16:45:57 [INFO] Dates are consistent. All dates are YYYY-mm-dd
  2025-09-12 16:45:57 [INFO] Check if all litter types in the type file are present in the data file
  2025-09-12 16:45:57 [INFO] All litter types are present
  2025-09-12 16:45:57 [INFO] Select only litter data
  2025-09-12 16:45:57 [INFO] Check for empty cells
  2025-09-12 16:45:57 [INFO] No empty cells found
  2025-09-12 16:45:57 [INFO] Check that litter counts are numbers
  2025-09-12 16:45:57 [ERROR] The following data column(s) contain(s) text: 'plastic: yokes [1]'. Please correct your data file.
  2025-09-12 16:45:57 [INFO] Check if required metadata columns 'location_code' and 'date' exist.
  2025-09-12 16:45:57 [INFO] All required columns are available
  2025-09-12 16:45:57 [INFO] Check if optional columns are available.
  2025-09-12 16:45:57 [INFO] No optional columns found.
  2025-09-12 16:45:57 [INFO] Checking date format
  2025-09-12 16:45:57 [INFO] All dates are ISO 8601 compliant (YYYY-mm-dd)
  2025-09-12 16:45:57 [INFO] Checking consistency of dates
  2025-09-12 16:45:57 [INFO] Dates are consistent. All dates are YYYY-mm-dd
  2025-09-12 16:45:57 [INFO] Check if all litter types in the type file are present in the data file
  2025-09-12 16:45:57 [INFO] All litter types are present
  2025-09-12 16:45:57 [INFO] Select only litter data
  2025-09-12 16:45:57 [INFO] Check for empty cells
  2025-09-12 16:45:57 [ERROR] The following data column(s) contain(s) empty cells:plastic: yokes [1]
  [ FAIL 2 | WARN 0 | SKIP 1 | PASS 71 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-counts.R:3:5'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-stats.R:59:5'): Wilcoxon is correct ──────────────────────────
  p_value(wl) not equal to wr$p.value.
  1/1 mismatches
  [1] 0.00185 - 0.00224 == -0.000389
  ── Failure ('test-stats.R:60:5'): Wilcoxon is correct ──────────────────────────
  test_statistic(wl) not equivalent to wr$statistic.
  1/1 mismatches
  [1] 53.5 - 33.5 == 20
  
  [ FAIL 2 | WARN 0 | SKIP 1 | PASS 71 ]
  Error: Test failures
  Execution halted