Last updated on 2025-12-19 11:49:46 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 0.3.3 | 2.73 | 48.19 | 50.92 | OK | |
| r-devel-linux-x86_64-debian-gcc | 0.3.3 | 2.06 | 34.87 | 36.93 | OK | |
| r-devel-linux-x86_64-fedora-clang | 0.3.3 | 57.96 | ERROR | |||
| r-devel-linux-x86_64-fedora-gcc | 0.3.3 | 53.36 | ERROR | |||
| r-devel-windows-x86_64 | 0.3.3 | 5.00 | 56.00 | 61.00 | OK | |
| r-patched-linux-x86_64 | 0.3.3 | 2.93 | 37.11 | 40.04 | OK | |
| r-release-linux-x86_64 | 0.3.3 | 2.62 | 36.86 | 39.48 | OK | |
| r-release-macos-arm64 | 0.3.3 | OK | ||||
| r-release-macos-x86_64 | 0.3.3 | 2.00 | 58.00 | 60.00 | OK | |
| r-release-windows-x86_64 | 0.3.3 | 3.00 | 56.00 | 59.00 | OK | |
| r-oldrel-macos-arm64 | 0.3.3 | OK | ||||
| r-oldrel-macos-x86_64 | 0.3.3 | 2.00 | 58.00 | 60.00 | OK | |
| r-oldrel-windows-x86_64 | 0.3.3 | 6.00 | 68.00 | 74.00 | OK |
Version: 0.3.3
Check: examples
Result: ERROR
Running examples in ‘behavr-Ex.R’ failed
The error most likely occurred in:
> ### 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
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Version: 0.3.3
Check: tests
Result: ERROR
Running ‘testthat.R’
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
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc