Last updated on 2025-12-20 09:49:55 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 2024.9.3 | 10.47 | 107.91 | 118.38 | OK | |
| r-devel-linux-x86_64-debian-gcc | 2024.9.3 | 6.41 | 61.74 | 68.15 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 2024.9.3 | 19.00 | 151.53 | 170.53 | ERROR | |
| r-devel-linux-x86_64-fedora-gcc | 2024.9.3 | 15.00 | 143.54 | 158.54 | ERROR | |
| r-devel-windows-x86_64 | 2024.9.3 | 15.00 | 126.00 | 141.00 | OK | |
| r-patched-linux-x86_64 | 2024.9.3 | 9.27 | 98.07 | 107.34 | OK | |
| r-release-linux-x86_64 | 2024.9.3 | 9.45 | 97.76 | 107.21 | OK | |
| r-release-macos-arm64 | 2024.9.3 | OK | ||||
| r-release-macos-x86_64 | 2024.9.3 | 7.00 | 73.00 | 80.00 | OK | |
| r-release-windows-x86_64 | 2024.9.3 | 15.00 | 116.00 | 131.00 | OK | |
| r-oldrel-macos-arm64 | 2024.9.3 | OK | ||||
| r-oldrel-macos-x86_64 | 2024.9.3 | 7.00 | 62.00 | 69.00 | OK | |
| r-oldrel-windows-x86_64 | 2024.9.3 | 20.00 | 146.00 | 166.00 | OK |
Version: 2024.9.3
Check: examples
Result: ERROR
Running examples in ‘penaltyLearning-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ROChange
> ### Title: ROC curve for changepoints
> ### Aliases: ROChange
>
> ### ** Examples
>
>
> library(penaltyLearning)
> library(data.table)
Attaching package: ‘data.table’
The following object is masked from ‘package:base’:
%notin%
>
> data(neuroblastomaProcessed, envir=environment())
> ## Get incorrect labels data for one profile.
> pid <- 11
> pro.errors <- neuroblastomaProcessed$errors[
+ profile.id==pid][order(chromosome, min.log.lambda)]
> dcast(pro.errors, n.segments ~ chromosome, value.var="errors")
Key: <n.segments>
n.segments 1 2 3 4 11 17
<int> <num> <num> <num> <num> <num> <num>
1: 1 1 0 0 1 0 0
2: 2 0 0 NA 0 0 1
3: 3 0 0 1 0 NA NA
4: 4 NA NA NA NA 1 NA
5: 5 0 1 1 0 1 1
6: 6 0 1 NA NA 1 1
7: 7 NA 1 1 0 1 1
8: 8 0 1 1 0 1 NA
9: 9 NA 1 NA NA 1 1
10: 10 0 NA 1 NA NA 1
11: 11 0 NA 1 NA 1 1
12: 12 NA NA 1 0 NA 1
13: 13 NA 1 NA 0 1 1
14: 14 NA 1 NA NA 1 1
15: 15 0 1 1 0 1 1
16: 16 NA NA 1 0 1 NA
17: 17 NA 1 NA 0 1 1
18: 18 0 NA 1 0 1 1
19: 19 0 1 1 0 1 NA
20: 20 0 1 1 0 1 1
n.segments 1 2 3 4 11 17
> ## Get the feature that corresponds to the BIC penalty = log(n),
> ## meaning log(penalty) = log(log(n)).
> chr.vec <- paste(c(1:4, 11, 17))
> pid.names <- paste0(pid, ".", chr.vec)
> BIC.feature <- neuroblastomaProcessed$feature.mat[pid.names, "log2.n"]
> pred <- data.table(pred.log.lambda=BIC.feature, chromosome=chr.vec)
> ## edit one prediction so that it ends up having the same threshold
> ## as another one, to illustrate an aum sub-differential with
> ## un-equal lo/hi bounds.
> err.changes <- pro.errors[, {
+ .SD[c(NA, diff(errors) != 0), .(min.log.lambda)]
+ }, by=chromosome]
> (ch.vec <- err.changes[, structure(min.log.lambda, names=chromosome)])
1 2 3 4 11 17
2.3947329 -0.4565704 -0.2495940 0.7307934 0.5528004 1.0369324
> other <- "11"
> (diff.other <- ch.vec[[other]]-pred[other, pred.log.lambda, on=.(chromosome)])
[1] -1.075214
> pred["1", pred.log.lambda := ch.vec[["1"]]-diff.other, on=.(chromosome)]
> pred["4", pred.log.lambda := 2, on=.(chromosome)]
> ch.vec[["1"]]-pred["1", pred.log.lambda, on=.(chromosome)]
[1] -1.075214
> result <- ROChange(pro.errors, pred, "chromosome")
Error in `[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), :
attempt access index 15/15 in VECTOR_ELT
Calls: ROChange -> [ -> [.data.table
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 2024.9.3
Check: tests
Result: ERROR
Running ‘testthat.R’ [18s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> data.table::setDTthreads(1)
> if(require(testthat))test_check("penaltyLearning")
Loading required package: testthat
Loading required package: penaltyLearning
Saving _problems/test-ROChange-aum-44.R
Saving _problems/test-ROChange-aum-75.R
Saving _problems/test-ROChange-aum-86.R
Saving _problems/test-ROChange-aum-107.R
Saving _problems/test-ROChange-aum-118.R
problem pred.log.lambda problems
<num> <num> <int>
1: 2 -1 2
2: 2 0 2
Saving _problems/test-ROChange-aum-146.R
Saving _problems/test-ROChange-aum-167.R
Saving _problems/test-ROChange-aum-188.R
Saving _problems/test-ROChange-aum-199.R
Saving _problems/test-ROChange-aum-222.R
Saving _problems/test-ROChange-aum-258.R
Saving _problems/test-ROChange-aum-289.R
Saving _problems/test-ROChange-no-thresh-21.R
Saving _problems/test-ROChange-no-thresh-38.R
Saving _problems/test-ROChange-no-thresh-38.R
Saving _problems/test-ROChange-no-thresh-38.R
Saving _problems/test-ROChange-no-thresh-48.R
Saving _problems/test-ROChange-no-thresh-48.R
Saving _problems/test-ROChange-no-thresh-48.R
Key: <problem>
problem min max
<char> <num> <num>
1: always-tp -Inf -600
Key: <problem>
problem min max
<char> <num> <num>
1: two-thresh -600 Inf
Saving _problems/test-ROChange-no-thresh-84.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-22.R
Saving _problems/test-ROChange-44.R
Saving _problems/test-ROChange-63.R
Saving _problems/test-ROChange-85.R
Saving _problems/test-errors-51.R
Saving _problems/test-errors-65.R
[ FAIL 32 | WARN 6 | SKIP 0 | PASS 122 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-ROChange-aum.R:44:3'): noncvx 1fp[-1,0] 1fn[0,1] ───────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:44:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:75:3'): 1fp[-1,0] 1fn[0,1] ──────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:75:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:86:3'): 1fp[0,0] 1fn[0,0] ───────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:86:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:107:3'): 1fp[-1,0] 1fn[0,1], no change ──────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:107:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:118:3'): three problems but two predictions ─────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:118:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:146:3'): 1fp[-1,0] 2fn[0,2] 1fp[-1,0] ───────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:146:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:167:3'): 1fp[-1,0] 1fn[0,1] 1fp[-1,0] ───────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:167:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:188:3'): 2fp[-2,0] 1fn[0,1] 2fp2fn(0)[-1,1] ─────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:188:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:199:3'): 2fp[-2,-1] 1fn[0,1] 2fp2fn(1)[1,2] ─────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:199:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:222:3'): 4fp(-1)[-3,-2](0)[-2,0] 1fn[0,1] 2fp2fn(0)[-1,1](1)[1,2] ──
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:222:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:258:3'): auc=2 for one error curve with one loop ──
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 12/12 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange-aum.R:258:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:289:3'): aum not -Inf ───────────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(p, pred.dt, problem.vars = "problem") at test-ROChange-aum.R:289:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-no-thresh.R:21:3'): problem with no thresh is OK ──────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(model.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:21:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:36:5'): inconsistent possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn should be constant for each problem"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:36:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:37:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:36:5'): inconsistent possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fp should be constant for each problem"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:36:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:37:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:36:5'): inconsistent possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "labels should be constant for each problem"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:36:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:37:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:46:5'): negative possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn/possible.fp/labels should be non-negative"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:46:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(negative.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:47:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:46:5'): negative possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn/possible.fp/labels should be non-negative"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:46:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(negative.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:47:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:46:5'): negative possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn/possible.fp/labels should be non-negative"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:46:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(negative.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:47:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:82:3'): problem with inconsistent min/max.log.lambda is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "max.log.lambda should be equal to the next min.log.lambda"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:82: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. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:83:5
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fn should be in [0,possible.fn]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fn should be in [0,possible.fn]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fp should be in [0,possible.fp]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fp should be in [0,possible.fp]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "errors should be in [0,labels]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "errors should be in [0,labels]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange.R:22:3'): AUC of reverse ROC curve is 1 ───────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 12/12 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange.R:22:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange.R:42:3'): error for labels less than errors ─────────
`{ ... }` threw an error with unexpected message.
Expected match: "errors should be in [0,labels]"
Actual message: "attempt access index 12/12 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange.R:42: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. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange.R:43:5
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange.R:63:3'): AUC of reverse incomplete ROC curve is 1 ────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 12/12 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange.R:63:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange.R:85:3'): only one prediction row even when prediction is on threshold ──
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 11/11 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(simple.err, ok.pred, pvars) at test-ROChange.R:85:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-errors.R:51:3'): no error for finite limits ────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::targetIntervalROC(ok3, 1:3) at test-errors.R:51:3
2. └─penaltyLearning::ROChange(target.errors, pred.dt, "observation")
3. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
4. └─data.table:::`[.data.table`(...)
── Error ('test-errors.R:65:3'): no error for one col vector predictions ───────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::targetIntervalROC(ok3, cbind(foo = 1:3)) at test-errors.R:65:3
2. └─penaltyLearning::ROChange(target.errors, pred.dt, "observation")
3. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
4. └─data.table:::`[.data.table`(...)
[ FAIL 32 | WARN 6 | SKIP 0 | PASS 122 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 2024.9.3
Check: examples
Result: ERROR
Running examples in ‘penaltyLearning-Ex.R’ failed
The error most likely occurred in:
> ### Name: ROChange
> ### Title: ROC curve for changepoints
> ### Aliases: ROChange
>
> ### ** Examples
>
>
> library(penaltyLearning)
> library(data.table)
Attaching package: ‘data.table’
The following object is masked from ‘package:base’:
%notin%
>
> data(neuroblastomaProcessed, envir=environment())
> ## Get incorrect labels data for one profile.
> pid <- 11
> pro.errors <- neuroblastomaProcessed$errors[
+ profile.id==pid][order(chromosome, min.log.lambda)]
> dcast(pro.errors, n.segments ~ chromosome, value.var="errors")
Key: <n.segments>
n.segments 1 2 3 4 11 17
<int> <num> <num> <num> <num> <num> <num>
1: 1 1 0 0 1 0 0
2: 2 0 0 NA 0 0 1
3: 3 0 0 1 0 NA NA
4: 4 NA NA NA NA 1 NA
5: 5 0 1 1 0 1 1
6: 6 0 1 NA NA 1 1
7: 7 NA 1 1 0 1 1
8: 8 0 1 1 0 1 NA
9: 9 NA 1 NA NA 1 1
10: 10 0 NA 1 NA NA 1
11: 11 0 NA 1 NA 1 1
12: 12 NA NA 1 0 NA 1
13: 13 NA 1 NA 0 1 1
14: 14 NA 1 NA NA 1 1
15: 15 0 1 1 0 1 1
16: 16 NA NA 1 0 1 NA
17: 17 NA 1 NA 0 1 1
18: 18 0 NA 1 0 1 1
19: 19 0 1 1 0 1 NA
20: 20 0 1 1 0 1 1
n.segments 1 2 3 4 11 17
> ## Get the feature that corresponds to the BIC penalty = log(n),
> ## meaning log(penalty) = log(log(n)).
> chr.vec <- paste(c(1:4, 11, 17))
> pid.names <- paste0(pid, ".", chr.vec)
> BIC.feature <- neuroblastomaProcessed$feature.mat[pid.names, "log2.n"]
> pred <- data.table(pred.log.lambda=BIC.feature, chromosome=chr.vec)
> ## edit one prediction so that it ends up having the same threshold
> ## as another one, to illustrate an aum sub-differential with
> ## un-equal lo/hi bounds.
> err.changes <- pro.errors[, {
+ .SD[c(NA, diff(errors) != 0), .(min.log.lambda)]
+ }, by=chromosome]
> (ch.vec <- err.changes[, structure(min.log.lambda, names=chromosome)])
1 2 3 4 11 17
2.3947329 -0.4565704 -0.2495940 0.7307934 0.5528004 1.0369324
> other <- "11"
> (diff.other <- ch.vec[[other]]-pred[other, pred.log.lambda, on=.(chromosome)])
[1] -1.075214
> pred["1", pred.log.lambda := ch.vec[["1"]]-diff.other, on=.(chromosome)]
> pred["4", pred.log.lambda := 2, on=.(chromosome)]
> ch.vec[["1"]]-pred["1", pred.log.lambda, on=.(chromosome)]
[1] -1.075214
> result <- ROChange(pro.errors, pred, "chromosome")
Error in `[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), :
attempt access index 15/15 in VECTOR_ELT
Calls: ROChange -> [ -> [.data.table
Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Version: 2024.9.3
Check: tests
Result: ERROR
Running ‘testthat.R’ [53s/104s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> data.table::setDTthreads(1)
> if(require(testthat))test_check("penaltyLearning")
Loading required package: testthat
Loading required package: penaltyLearning
Saving _problems/test-ROChange-aum-44.R
Saving _problems/test-ROChange-aum-75.R
Saving _problems/test-ROChange-aum-86.R
Saving _problems/test-ROChange-aum-107.R
Saving _problems/test-ROChange-aum-118.R
problem pred.log.lambda problems
<num> <num> <int>
1: 2 -1 2
2: 2 0 2
Saving _problems/test-ROChange-aum-146.R
Saving _problems/test-ROChange-aum-167.R
Saving _problems/test-ROChange-aum-188.R
Saving _problems/test-ROChange-aum-199.R
Saving _problems/test-ROChange-aum-222.R
Saving _problems/test-ROChange-aum-258.R
Saving _problems/test-ROChange-aum-289.R
Saving _problems/test-ROChange-no-thresh-21.R
Saving _problems/test-ROChange-no-thresh-38.R
Saving _problems/test-ROChange-no-thresh-38.R
Saving _problems/test-ROChange-no-thresh-38.R
Saving _problems/test-ROChange-no-thresh-48.R
Saving _problems/test-ROChange-no-thresh-48.R
Saving _problems/test-ROChange-no-thresh-48.R
Key: <problem>
problem min max
<char> <num> <num>
1: always-tp -Inf -600
Key: <problem>
problem min max
<char> <num> <num>
1: two-thresh -600 Inf
Saving _problems/test-ROChange-no-thresh-84.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-22.R
Saving _problems/test-ROChange-44.R
Saving _problems/test-ROChange-63.R
Saving _problems/test-ROChange-85.R
Saving _problems/test-errors-51.R
Saving _problems/test-errors-65.R
[ FAIL 32 | WARN 6 | SKIP 0 | PASS 122 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-ROChange-aum.R:44:3'): noncvx 1fp[-1,0] 1fn[0,1] ───────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:44:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:75:3'): 1fp[-1,0] 1fn[0,1] ──────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:75:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:86:3'): 1fp[0,0] 1fn[0,0] ───────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:86:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:107:3'): 1fp[-1,0] 1fn[0,1], no change ──────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:107:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:118:3'): three problems but two predictions ─────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:118:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:146:3'): 1fp[-1,0] 2fn[0,2] 1fp[-1,0] ───────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:146:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:167:3'): 1fp[-1,0] 1fn[0,1] 1fp[-1,0] ───────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:167:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:188:3'): 2fp[-2,0] 1fn[0,1] 2fp2fn(0)[-1,1] ─────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:188:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:199:3'): 2fp[-2,-1] 1fn[0,1] 2fp2fn(1)[1,2] ─────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:199:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:222:3'): 4fp(-1)[-3,-2](0)[-2,0] 1fn[0,1] 2fp2fn(0)[-1,1](1)[1,2] ──
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:222:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:258:3'): auc=2 for one error curve with one loop ──
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 12/12 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange-aum.R:258:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:289:3'): aum not -Inf ───────────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(p, pred.dt, problem.vars = "problem") at test-ROChange-aum.R:289:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-no-thresh.R:21:3'): problem with no thresh is OK ──────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(model.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:21:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:36:5'): inconsistent possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn should be constant for each problem"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:36:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:37:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:36:5'): inconsistent possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fp should be constant for each problem"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:36:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:37:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:36:5'): inconsistent possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "labels should be constant for each problem"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:36:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:37:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:46:5'): negative possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn/possible.fp/labels should be non-negative"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:46:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(negative.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:47:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:46:5'): negative possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn/possible.fp/labels should be non-negative"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:46:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(negative.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:47:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:46:5'): negative possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn/possible.fp/labels should be non-negative"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:46:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(negative.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:47:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:82:3'): problem with inconsistent min/max.log.lambda is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "max.log.lambda should be equal to the next min.log.lambda"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:82: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. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:83:5
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fn should be in [0,possible.fn]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fn should be in [0,possible.fn]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fp should be in [0,possible.fp]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fp should be in [0,possible.fp]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "errors should be in [0,labels]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "errors should be in [0,labels]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange.R:22:3'): AUC of reverse ROC curve is 1 ───────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 12/12 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange.R:22:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange.R:42:3'): error for labels less than errors ─────────
`{ ... }` threw an error with unexpected message.
Expected match: "errors should be in [0,labels]"
Actual message: "attempt access index 12/12 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange.R:42: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. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange.R:43:5
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange.R:63:3'): AUC of reverse incomplete ROC curve is 1 ────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 12/12 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange.R:63:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange.R:85:3'): only one prediction row even when prediction is on threshold ──
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 11/11 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(simple.err, ok.pred, pvars) at test-ROChange.R:85:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-errors.R:51:3'): no error for finite limits ────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::targetIntervalROC(ok3, 1:3) at test-errors.R:51:3
2. └─penaltyLearning::ROChange(target.errors, pred.dt, "observation")
3. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
4. └─data.table:::`[.data.table`(...)
── Error ('test-errors.R:65:3'): no error for one col vector predictions ───────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::targetIntervalROC(ok3, cbind(foo = 1:3)) at test-errors.R:65:3
2. └─penaltyLearning::ROChange(target.errors, pred.dt, "observation")
3. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
4. └─data.table:::`[.data.table`(...)
[ FAIL 32 | WARN 6 | SKIP 0 | PASS 122 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 2024.9.3
Check: tests
Result: ERROR
Running ‘testthat.R’ [50s/56s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> data.table::setDTthreads(1)
> if(require(testthat))test_check("penaltyLearning")
Loading required package: testthat
Loading required package: penaltyLearning
Saving _problems/test-ROChange-aum-44.R
Saving _problems/test-ROChange-aum-75.R
Saving _problems/test-ROChange-aum-86.R
Saving _problems/test-ROChange-aum-107.R
Saving _problems/test-ROChange-aum-118.R
problem pred.log.lambda problems
<num> <num> <int>
1: 2 -1 2
2: 2 0 2
Saving _problems/test-ROChange-aum-146.R
Saving _problems/test-ROChange-aum-167.R
Saving _problems/test-ROChange-aum-188.R
Saving _problems/test-ROChange-aum-199.R
Saving _problems/test-ROChange-aum-222.R
Saving _problems/test-ROChange-aum-258.R
Saving _problems/test-ROChange-aum-289.R
Saving _problems/test-ROChange-no-thresh-21.R
Saving _problems/test-ROChange-no-thresh-38.R
Saving _problems/test-ROChange-no-thresh-38.R
Saving _problems/test-ROChange-no-thresh-38.R
Saving _problems/test-ROChange-no-thresh-48.R
Saving _problems/test-ROChange-no-thresh-48.R
Saving _problems/test-ROChange-no-thresh-48.R
Key: <problem>
problem min max
<char> <num> <num>
1: always-tp -Inf -600
Key: <problem>
problem min max
<char> <num> <num>
1: two-thresh -600 Inf
Saving _problems/test-ROChange-no-thresh-84.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-no-thresh-104.R
Saving _problems/test-ROChange-22.R
Saving _problems/test-ROChange-44.R
Saving _problems/test-ROChange-63.R
Saving _problems/test-ROChange-85.R
Saving _problems/test-errors-51.R
Saving _problems/test-errors-65.R
[ FAIL 32 | WARN 6 | SKIP 0 | PASS 122 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-ROChange-aum.R:44:3'): noncvx 1fp[-1,0] 1fn[0,1] ───────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:44:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:75:3'): 1fp[-1,0] 1fn[0,1] ──────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:75:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:86:3'): 1fp[0,0] 1fn[0,0] ───────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:86:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:107:3'): 1fp[-1,0] 1fn[0,1], no change ──────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:107:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:118:3'): three problems but two predictions ─────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:118:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:146:3'): 1fp[-1,0] 2fn[0,2] 1fp[-1,0] ───────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:146:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:167:3'): 1fp[-1,0] 1fn[0,1] 1fp[-1,0] ───────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:167:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:188:3'): 2fp[-2,0] 1fn[0,1] 2fp2fn(0)[-1,1] ─────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:188:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:199:3'): 2fp[-2,-1] 1fn[0,1] 2fp2fn(1)[1,2] ─────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:199:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:222:3'): 4fp(-1)[-3,-2](0)[-2,0] 1fn[0,1] 2fp2fn(0)[-1,1](1)[1,2] ──
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(models, predictions, "problem") at test-ROChange-aum.R:222:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:258:3'): auc=2 for one error curve with one loop ──
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 12/12 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange-aum.R:258:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-aum.R:289:3'): aum not -Inf ───────────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(p, pred.dt, problem.vars = "problem") at test-ROChange-aum.R:289:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange-no-thresh.R:21:3'): problem with no thresh is OK ──────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(model.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:21:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:36:5'): inconsistent possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn should be constant for each problem"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:36:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:37:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:36:5'): inconsistent possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fp should be constant for each problem"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:36:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:37:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:36:5'): inconsistent possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "labels should be constant for each problem"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:36:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:37:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:46:5'): negative possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn/possible.fp/labels should be non-negative"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:46:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(negative.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:47:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:46:5'): negative possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn/possible.fp/labels should be non-negative"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:46:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(negative.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:47:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:46:5'): negative possible.fn/possible.fp/labels is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "possible.fn/possible.fp/labels should be non-negative"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:46:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(negative.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:47:7
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:82:3'): problem with inconsistent min/max.log.lambda is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "max.log.lambda should be equal to the next min.log.lambda"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:82: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. └─penaltyLearning::ROChange(inconsistent.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:83:5
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fn should be in [0,possible.fn]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fn should be in [0,possible.fn]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fp should be in [0,possible.fp]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "fp should be in [0,possible.fp]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "errors should be in [0,labels]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange-no-thresh.R:102:7'): problem with fp/fn/errors out of range is an error ──
`{ ... }` threw an error with unexpected message.
Expected match: "errors should be in [0,labels]"
Actual message: "attempt access index 10/10 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange-no-thresh.R:102:7
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─penaltyLearning::ROChange(out.dt, pred.dt, "problem") at test-ROChange-no-thresh.R:103:9
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange.R:22:3'): AUC of reverse ROC curve is 1 ───────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 12/12 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange.R:22:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Failure ('test-ROChange.R:42:3'): error for labels less than errors ─────────
`{ ... }` threw an error with unexpected message.
Expected match: "errors should be in [0,labels]"
Actual message: "attempt access index 12/12 in VECTOR_ELT"
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-ROChange.R:42: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. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange.R:43:5
7. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
8. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange.R:63:3'): AUC of reverse incomplete ROC curve is 1 ────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 12/12 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(segs.dt, pred.dt, "problem") at test-ROChange.R:63:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-ROChange.R:85:3'): only one prediction row even when prediction is on threshold ──
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 11/11 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::ROChange(simple.err, ok.pred, pvars) at test-ROChange.R:85:3
2. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
3. └─data.table:::`[.data.table`(...)
── Error ('test-errors.R:51:3'): no error for finite limits ────────────────────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::targetIntervalROC(ok3, 1:3) at test-errors.R:51:3
2. └─penaltyLearning::ROChange(target.errors, pred.dt, "observation")
3. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
4. └─data.table:::`[.data.table`(...)
── Error ('test-errors.R:65:3'): no error for one col vector predictions ───────
Error in ``[.data.table`(err, , `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─penaltyLearning::targetIntervalROC(ok3, cbind(foo = 1:3)) at test-errors.R:65:3
2. └─penaltyLearning::ROChange(target.errors, pred.dt, "observation")
3. ├─err[, `:=`(next.min, c(min.log.lambda[-1], Inf)), by = problem.vars]
4. └─data.table:::`[.data.table`(...)
[ FAIL 32 | WARN 6 | SKIP 0 | PASS 122 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc