- using R Under development (unstable) (2025-12-19 r89206)
- 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 ‘sleepr/DESCRIPTION’ ... OK
- this is package ‘sleepr’ version ‘0.3.1’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [1s/1s] 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 serialization versions ... OK
- checking whether package ‘sleepr’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... 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 ... [0s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the package can be unloaded cleanly ... [0s/0s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the namespace can be unloaded cleanly ... [0s/0s] OK
- checking loading without being on the library search path ... [0s/1s] 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 ... [3s/5s] OK
- checking Rd files ... [0s/0s] 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 examples ... [1s/1s] ERROR
Running examples in ‘sleepr-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: bout_analysis
> ### Title: Find "bouts" in categorical time series
> ### Aliases: bout_analysis
>
> ### ** Examples
>
> # Bout analysis on binary variable:
> dt <- toy_dam_data()
Error in `[.data.table`(out, , `:=`(activity, abs(c(0, diff(sign(0.5 - :
attempt access index 5/5 in VECTOR_ELT
Calls: toy_dam_data -> [ -> [.behavr -> NextMethod -> [.data.table
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [7s/6s] ERROR
Running ‘testthat.R’ [7s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(sleepr)
Loading required package: behavr
Loading required package: data.table
Attaching package: 'data.table'
The following object is masked from 'package:base':
%notin%
>
> test_check("sleepr")
Saving _problems/test-max_velocity_detector-10.R
Saving _problems/test-max_velocity_detector-22.R
Saving _problems/test-prepare_data_for_motion_detector-14.R
Saving _problems/test-sleep_annotation-6.R
Saving _problems/test-sleep_annotation-31.R
Saving _problems/test-virtual_beam_cross_detector-10.R
[ FAIL 6 | WARN 0 | SKIP 1 | PASS 25 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test-bout_analysis.R:3:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-max_velocity_detector.R:10:3'): max_velocity_detector works ────
Error in ``[.data.table`(data, , `:=`(n_points, .N), by = t_w)`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. └─sleepr::max_velocity_detector(data, 10) at test-max_velocity_detector.R:10:3
2. └─sleepr:::prepare_data_for_motion_detector(...)
3. └─sleepr:::curate_sparse_roi_data(d)
4. ├─data[, `:=`(n_points, .N), by = t_w]
5. └─data.table:::`[.data.table`(data, , `:=`(n_points, .N), by = t_w)
── Error ('test-max_velocity_detector.R:21:3'): max_velocity_detector wans when no interaction and masking ──
Error in ``[.data.table`(data, , `:=`(n_points, .N), by = t_w)`: attempt access index 5/5 in VECTOR_ELT
Backtrace:
▆
1. ├─testthat::expect_warning(...) at test-max_velocity_detector.R:21:3
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─sleepr::max_velocity_detector(data, 10)
7. └─sleepr:::prepare_data_for_motion_detector(...)
8. └─sleepr:::curate_sparse_roi_data(d)
9. ├─data[, `:=`(n_points, .N), by = t_w]
10. └─data.table:::`[.data.table`(data, , `:=`(n_points, .N), by = t_w)
── Error ('test-prepare_data_for_motion_detector.R:11:3'): prepare_data_for_motion_detector works ──
Error in ``[.data.table`(data, , `:=`(n_points, .N), by = t_w)`: attempt access index 6/6 in VECTOR_ELT
Backtrace:
▆
1. └─sleepr:::prepare_data_for_motion_detector(...) at test-prepare_data_for_motion_detector.R:11:3
2. └─sleepr:::curate_sparse_roi_data(d)
3. ├─data[, `:=`(n_points, .N), by = t_w]
4. └─data.table:::`[.data.table`(data, , `:=`(n_points, .N), by = t_w)
── Error ('test-sleep_annotation.R:6:3'): sleep_annotation works return expected results ──
Error in ``[.data.table`(data, , `:=`(n_points, .N), by = t_w)`: attempt access index 4/4 in VECTOR_ELT
Backtrace:
▆
1. └─sleepr::sleep_annotation(data, motion_detector_FUN = virtual_beam_cross_detector) at test-sleep_annotation.R:6:3
2. └─sleepr (local) wrapped(data)
3. └─sleepr (local) motion_detector_FUN(d, time_window_length, ...)
4. └─sleepr:::prepare_data_for_motion_detector(...)
5. └─sleepr:::curate_sparse_roi_data(d)
6. ├─data[, `:=`(n_points, .N), by = t_w]
7. └─data.table:::`[.data.table`(data, , `:=`(n_points, .N), by = t_w)
── Error ('test-sleep_annotation.R:31:3'): sleep_annotation works for single or multiple animals ──
Error in ``[.data.table`(data, , `:=`(n_points, .N), by = t_w)`: attempt access index 4/4 in VECTOR_ELT
Backtrace:
▆
1. └─sleepr::sleep_annotation(data[id == 1][, -"id", with = F], motion_detector_FUN = virtual_beam_cross_detector) at test-sleep_annotation.R:31:3
2. └─sleepr (local) wrapped(data)
3. └─sleepr (local) motion_detector_FUN(d, time_window_length, ...)
4. └─sleepr:::prepare_data_for_motion_detector(...)
5. └─sleepr:::curate_sparse_roi_data(d)
6. ├─data[, `:=`(n_points, .N), by = t_w]
7. └─data.table:::`[.data.table`(data, , `:=`(n_points, .N), by = t_w)
── Error ('test-virtual_beam_cross_detector.R:10:3'): virtual_beam_cross_detector works ──
Error in ``[.data.table`(data, , `:=`(n_points, .N), by = t_w)`: attempt access index 4/4 in VECTOR_ELT
Backtrace:
▆
1. └─sleepr::virtual_beam_cross_detector(data, 10) at test-virtual_beam_cross_detector.R:10:3
2. └─sleepr:::prepare_data_for_motion_detector(...)
3. └─sleepr:::curate_sparse_roi_data(d)
4. ├─data[, `:=`(n_points, .N), by = t_w]
5. └─data.table:::`[.data.table`(data, , `:=`(n_points, .N), by = t_w)
[ FAIL 6 | WARN 0 | SKIP 1 | PASS 25 ]
Error:
! Test failures.
Execution halted
- checking PDF version of manual ... [3s/5s] OK
- checking HTML version of manual ... [0s/0s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs