- using R Under development (unstable) (2025-12-20 r89211)
- 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 ‘behavr/DESCRIPTION’ ... OK
- this is package ‘behavr’ version ‘0.3.3’
- 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 ‘behavr’ 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/0s] 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/1s] OK
- checking loading without being on the library search path ... [0s/0s] 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 ... [4s/3s] ERROR
Running examples in ‘behavr-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: bin_apply
> ### Title: Bin a variable (typically time) and compute an aggregate for
> ### each bin
> ### Aliases: bin_apply bin_apply_all
>
> ### ** Examples
>
> metadata <- data.frame(id = paste0("toy_experiment|",1:5))
> dt <- toy_activity_data(metadata, duration = days(2))
>
> # average by 30min time bins, default
> dt_binned <- bin_apply_all(dt, moving)
> # equivalent to
> dt_binned <- dt[, bin_apply(.SD, moving), by = "id"]
>
> # if we want the opposite of moving:
> dt_binned <- bin_apply_all(dt, !moving)
>
> # More advanced usage
> dt <- toy_dam_data(metadata, duration = days(2))
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 ... [5s/5s] ERROR
Running ‘testthat.R’ [4s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(behavr)
Loading required package: data.table
Attaching package: 'data.table'
The following object is masked from 'package:base':
%notin%
>
> test_check("behavr")
Saving _problems/test-behavr-157.R
==== METADATA ====
Key: <id>
id condition sex
<int> <char> <char>
1: 1 a M
2: 2 b M
3: 3 c M
4: 4 d F
5: 5 e F
====== DATA ======
Key: <id>
id t x y eating
<int> <int> <num> <num> <lgcl>
1: 1 1 -0.6264538 -0.62036668 TRUE
2: 1 2 0.1836433 0.04211587 FALSE
3: 1 3 -0.8356286 -0.91092165 TRUE
4: 1 4 1.5952808 0.15802877 TRUE
5: 1 5 0.3295078 -0.65458464 TRUE
---
496: 5 96 -2.0908461 -0.30824994 TRUE
497: 5 97 1.6973939 0.01551524 FALSE
498: 5 98 1.0638812 -0.44231772 TRUE
499: 5 99 -0.7666166 -1.63800773 FALSE
500: 5 100 0.3820076 -0.64140116 FALSE
behavr table with:
5 individuals
2 metavariables
4 variables
5e+02 measurements
1 key (id)
Summary of each individual (one per row):
Key: <id>
id condition sex data_points time_range
<int> <char> <char> <int> <char>
1: 1 a M 100 [1 -> 100 (99)]
2: 2 b M 100 [1 -> 100 (99)]
3: 3 c M 100 [1 -> 100 (99)]
4: 4 d F 100 [1 -> 100 (99)]
5: 5 e F 100 [1 -> 100 (99)]
behavr table with:
5 individuals
2 metavariables
4 variables
5e+02 measurements
1 key (id)
Saving _problems/test-stitch_on-23.R
Saving _problems/test-stitch_on-74.R
Saving _problems/test-toy-data-13.R
[ FAIL 4 | WARN 0 | SKIP 2 | PASS 74 ]
══ Skipped tests (2) ═══════════════════════════════════════════════════════════
• empty test (2): 'test-print_summary.R:3:1', 'test-print_summary.R:12:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-behavr.R:157:3'): metadata columns can be extracted without id ──
Error in ``[.data.table`(out, , `:=`(activity, abs(c(0, diff(sign(0.5 - x))))), by = "id")`: attempt access index 5/5 in VECTOR_ELT
Backtrace:
▆
1. └─behavr::toy_dam_data(metadata = met, duration = hours(1)) at test-behavr.R:157:3
2. ├─out[, `:=`(activity, abs(c(0, diff(sign(0.5 - x))))), by = "id"]
3. ├─behavr:::`[.behavr`(...)
4. ├─base::NextMethod()
5. └─data.table:::`[.data.table`(...)
── Error ('test-stitch_on.R:23:3'): stitch works ───────────────────────────────
Error in ``[.data.table`(md, , `:=`(lag, as.numeric(as.Date(time_ref__) - as.Date(min(time_ref__)), units = "secs")), by = on)`: attempt access index 5/5 in VECTOR_ELT
Backtrace:
▆
1. └─behavr::stitch_on(d, on = "uid") at test-stitch_on.R:23:3
2. ├─...[]
3. └─data.table:::`[.data.table`(...)
── Failure ('test-stitch_on.R:74:3'): stitch fails when overlap ────────────────
`stitch_on(d, on = "uid")` threw an error with unexpected message.
Expected match: "overlap"
Actual message: "attempt access index 5/5 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(stitch_on(d, on = "uid"), "overlap") at test-stitch_on.R:74: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. └─behavr::stitch_on(d, on = "uid")
7. ├─...[]
8. └─data.table:::`[.data.table`(...)
── Error ('test-toy-data.R:13:3'): toy data returns behavr object ──────────────
Error in ``[.data.table`(out, , `:=`(activity, abs(c(0, diff(sign(0.5 - x))))), by = "id")`: attempt access index 5/5 in VECTOR_ELT
Backtrace:
▆
1. └─behavr::toy_dam_data() at test-toy-data.R:13:3
2. ├─out[, `:=`(activity, abs(c(0, diff(sign(0.5 - x))))), by = "id"]
3. ├─behavr:::`[.behavr`(...)
4. ├─base::NextMethod()
5. └─data.table:::`[.data.table`(...)
[ FAIL 4 | WARN 0 | SKIP 2 | PASS 74 ]
Error:
! Test failures.
Execution halted
- checking PDF version of manual ... [4s/6s] OK
- checking HTML version of manual ... [1s/1s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs