Running ‘testthat.R’ [36s/44s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # On cran, all code may only use 2 threads.
  > # For some reason, threads=2 and threads=1 still results in "Running R code in ‘testthat.R’ had CPU time 3.2 (2.8) times elapsed time"
  > # Therefore set to single threaded (same as Win) and also set threads for openMP.
  > # As per the example in https://github.com/Rdatatable/data.table/issues/5658#issuecomment-1741934995, this is done before loading any packages
  > # check for cran is from testthat:::on_cran()
  > if(!identical(Sys.getenv("NOT_CRAN"), "true")){
  +   Sys.setenv("OMP_THREAD_LIMIT" = 1)
  +   data.table::setDTthreads(threads = 1)
  + }
  > 
  > library("testthat")
  > library("lubridate")
  
  Attaching package: 'lubridate'
  
  The following objects are masked from 'package:base':
  
      date, intersect, setdiff, union
  
  > library("data.table")
  
  Attaching package: 'data.table'
  
  The following objects are masked from 'package:lubridate':
  
      hour, isoweek, mday, minute, month, quarter, second, wday, week,
      yday, year
  
  The following object is masked from 'package:base':
  
      %notin%
  
  > library("CLVTools")
  > 
  > 
  > test_check("CLVTools")
  Saving _problems/test_correctness_bgnbd-12.R
  Saving _problems/test_correctness_clvdata_clvdata-51.R
  Saving _problems/test_correctness_clvdata_clvdata-76.R
  Saving _problems/test_correctness_clvdata_clvdata-408.R
  Saving _problems/test_correctness_clvdata_s3-34.R
  Saving _problems/test_correctness_clvdata_setdynamiccov-15.R
  Saving _problems/test_correctness_clvdata_setstaticcov-6.R
  The time of day stored in the provided data (of type POSIXct) is ignored (cut off).
  The time of day stored in the provided data (of type POSIXct) is ignored (cut off).
  The time of day stored in the provided data (of type POSIXct) is ignored (cut off).
  Saving _problems/test_correctness_clvtime-91.R
  Saving _problems/test_correctness_clvtime-92.R
  Saving _problems/test_correctness_clvtime-93.R
  Saving _problems/test_correctness_clvtime-94.R
  Saving _problems/test_correctness_clvtime-91.R
  Saving _problems/test_correctness_clvtime-92.R
  Saving _problems/test_correctness_clvtime-93.R
  Saving _problems/test_correctness_clvtime-94.R
  Saving _problems/test_correctness_clvtime-99.R
  The time of day stored in the provided data (of type POSIXct) is ignored (cut off).
  The time of day stored in the provided data (of type POSIXct) is ignored (cut off).
  The time of day stored in the provided data (of type POSIXct) is ignored (cut off).
  The time of day stored in the provided data (of type POSIXct) is ignored (cut off).
  The time of day stored in the provided data (of type POSIXct) is ignored (cut off).
  The time of day stored in the provided data (of type POSIXct) is ignored (cut off).
  Saving _problems/test_correctness_gg-12.R
  Saving _problems/test_correctness_ggomnbd-14.R
  Saving _problems/test_correctness_pnbd_nocovstaticcov-12.R
  Saving _problems/test_inputchecks_bgnbd_nocov-19.R
  Saving _problems/test_inputchecks_bootstrapping-5.R
  Saving _problems/test_inputchecks_gg-16.R
  Saving _problems/test_inputchecks_ggomnbd_nocov-21.R
  Saving _problems/test_inputchecks_pnbd_nocov-14.R
  Saving _problems/test_inputchecks_predict_spending-22.R
  Saving _problems/test_inputchecks_predict_transactions-108.R
  Saving _problems/test_runability_clvdata_setstaticcov-7.R
  [ FAIL 36 | WARN 0 | SKIP 87 | PASS 863 ]
  
  ══ Skipped tests (87) ══════════════════════════════════════════════════════════
  • On CRAN (86): 'test_consistency_bgnbd.R:1:1',
    'test_consistency_ggomnbd.R:1:1', 'test_consistency_pnbd.R:1:1',
    'test_correctness_bootstrapping.R:1:1',
    'test_correctness_clvdata_clvdata.R:13:3',
    'test_correctness_clvdata_clvdata.R:91:3',
    'test_correctness_clvdata_clvdata.R:119:3',
    'test_correctness_clvdata_clvdata.R:156:3',
    'test_correctness_clvdata_clvdata.R:169:3',
    'test_correctness_clvdata_clvdata.R:191:3',
    'test_correctness_clvdata_clvdata.R:211:3',
    'test_correctness_clvdata_clvdata.R:223:3',
    'test_correctness_clvdata_clvdata.R:238:3',
    'test_correctness_clvdata_clvdata.R:248:3',
    'test_correctness_clvdata_clvdata.R:260:3',
    'test_correctness_clvdata_clvdata.R:393:3',
    'test_correctness_clvdata_s3.R:6:3', 'test_correctness_clvdata_s3.R:61:3',
    'test_correctness_clvdata_s3.R:71:3', 'test_correctness_clvdata_s3.R:83:3',
    'test_correctness_clvdata_s3.R:94:3', 'test_correctness_clvdata_s3.R:102:3',
    'test_correctness_clvdata_s3.R:114:3', 'test_correctness_clvdata_s3.R:126:3',
    'test_correctness_clvdata_s3.R:145:3', 'test_correctness_clvdata_s3.R:174:3',
    'test_correctness_clvdata_s3.R:236:3', 'test_correctness_clvdata_s3.R:247:3',
    'test_correctness_clvdata_s3.R:256:3', 'test_correctness_clvdata_s3.R:273:3',
    'test_correctness_clvdata_s3.R:285:3', 'test_correctness_clvdata_s3.R:304:3',
    'test_correctness_clvdata_s3.R:319:3', 'test_correctness_clvdata_s3.R:340:3',
    'test_correctness_clvdata_s3.R:358:3', 'test_correctness_clvdata_s3.R:375:3',
    'test_correctness_clvdata_s3.R:396:3',
    'test_correctness_dynamiccov_walkcreation.R:1:1',
    'test_correctness_hessian.R:1:1', 'test_correctness_latentattrition.R:1:1',
    'test_correctness_pnbd_dyncov.R:1:1', 'test_correctness_spending.R:1:1',
    'test_inputchecks_bgnbd_staticcov.R:1:1',
    'test_inputchecks_clvdata_clvdata.R:1:1',
    'test_inputchecks_clvdata_plot.R:1:1',
    'test_inputchecks_clvdata_setdynamiccov.R:1:1',
    'test_inputchecks_ggomnbd_staticcov.R:1:1',
    'test_inputchecks_latentattrition.R:1:1',
    'test_inputchecks_newcustomer.R:1:1', 'test_inputchecks_plot_spending.R:1:1',
    'test_inputchecks_plot_transactions.R:166:1', 'test_inputchecks_pmf.R:1:1',
    'test_inputchecks_pnbd_staticcov.R:1:1', 'test_inputchecks_spending.R:1:1',
    'test_runability_bgnbd_nocov.R:1:1', 'test_runability_bgnbd_staticcov.R:1:1',
    'test_runability_bootstrapping.R:1:1',
    'test_runability_clvdata_clvdata.R:10:3',
    'test_runability_clvdata_clvdata.R:16:3',
    'test_runability_clvdata_clvdata.R:26:3',
    'test_runability_clvdata_clvdata.R:44:3',
    'test_runability_clvdata_clvdata.R:54:3',
    'test_runability_clvdata_clvdata.R:67:3',
    'test_runability_clvdata_clvdata.R:89:3',
    'test_runability_clvdata_clvdata.R:102:3',
    'test_runability_clvdata_clvdata.R:115:3',
    'test_runability_clvdata_clvdata.R:171:3',
    'test_runability_clvdata_clvdata.R:185:3',
    'test_runability_clvdata_clvdata.R:195:3',
    'test_runability_clvdata_clvdata.R:207:3',
    'test_runability_clvdata_clvdata.R:212:3',
    'test_runability_clvdata_clvdata.R:227:3',
    'test_runability_clvdata_clvdata.R:248:3',
    'test_runability_clvdata_clvdata.R:256:3',
    'test_runability_clvdata_s3.R:1:1',
    'test_runability_clvdata_setdynamiccov.R:1:1', 'test_runability_gg.R:1:1',
    'test_runability_ggomnbd_nocov.R:1:1',
    'test_runability_ggomnbd_staticcov.R:1:1',
    'test_runability_latentattrition.R:1:1', 'test_runability_lrtest.R:1:1',
    'test_runability_newcustomer.R:5:1', 'test_runability_pnbd_dynamiccov.R:5:1',
    'test_runability_pnbd_nocov.R:1:1', 'test_runability_pnbd_staticcov.R:1:1',
    'test_runability_spending.R:1:1'
  • empty test (1):
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_correctness_bgnbd.R:5:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.testthat.correctness.clvfittedtransactions(...) at test_correctness_bgnbd.R:5:1
   2.   └─CLVTools:::fct.helper.create.clvdata.cdnow() at ./helper_testthat_correctness_transactions.R:368:3
   3.     └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   4.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   5.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_clvdata.R:50:3'): Different estimation.split formats result in same split - data in POSIX UTC ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─CLVTools:::fct.helper.correctness.estimationsplit(...) at test_correctness_clvdata_clvdata.R:50:3
    2.   ├─testthat::expect_message(...) at ./helper_correctness_clvdata.R:7:5
    3.   │ └─testthat:::expect_condition_matching_(...)
    4.   │   └─testthat:::quasi_capture(...)
    5.   │     ├─testthat (local) .capture(...)
    6.   │     │ └─base::withCallingHandlers(...)
    7.   │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8.   └─CLVTools::clvdata(...)
    9.     └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   10.       ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   11.       └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_clvdata.R:75:3'): Different estimation.split formats result in same split - data in POSIX ACST ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─CLVTools:::fct.helper.correctness.estimationsplit(...) at test_correctness_clvdata_clvdata.R:75:3
    2.   ├─testthat::expect_message(...) at ./helper_correctness_clvdata.R:7:5
    3.   │ └─testthat:::expect_condition_matching_(...)
    4.   │   └─testthat:::quasi_capture(...)
    5.   │     ├─testthat (local) .capture(...)
    6.   │     │ └─base::withCallingHandlers(...)
    7.   │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8.   └─CLVTools::clvdata(...)
    9.     └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   10.       ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   11.       └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_clvdata.R:140:3'): Different units with same split results in same dates ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test_correctness_clvdata_clvdata.R:140:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─CLVTools::clvdata(...)
   10.   └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   11.     ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   12.     └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_clvdata.R:319:3'): Removes correct transaction ──
  Error in ``[.data.table`(dt.repeat.transactions, order(Date), `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(dt.repeat.trans <- clv.data.make.repeat.transactions(dt.trans[order(Date)])) at test_correctness_clvdata_clvdata.R:319:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─CLVTools:::clv.data.make.repeat.transactions(dt.trans[order(Date)])
   10.   ├─...[]
   11.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_clvdata.R:345:3'): 2 at the same timepoint (Date) ──
  Error in ``[.data.table`(dt.repeat.transactions, order(Date), `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(dt.repeat.trans <- clv.data.make.repeat.transactions(dt.trans)) at test_correctness_clvdata_clvdata.R:345:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─CLVTools:::clv.data.make.repeat.transactions(dt.trans)
   10.   ├─...[]
   11.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_clvdata.R:358:3'): 2 at the same timepoint (posix) ──
  Error in ``[.data.table`(dt.repeat.transactions, order(Date), `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(dt.repeat.trans <- clv.data.make.repeat.transactions(dt.trans)) at test_correctness_clvdata_clvdata.R:358:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─CLVTools:::clv.data.make.repeat.transactions(dt.trans)
   10.   ├─...[]
   11.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_clvdata.R:365:3'): Zero-repeaters are removed ──
  Error in ``[.data.table`(dt.repeat.transactions, order(Date), `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(dt.repeat.trans <- clv.data.make.repeat.transactions(dt.trans)) at test_correctness_clvdata_clvdata.R:365:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─CLVTools:::clv.data.make.repeat.transactions(dt.trans)
   10.   ├─...[]
   11.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_clvdata.R:384:3'): Aggregating first and removing after removes all first transactions ──
  Error in ``[.data.table`(dt.repeat.transactions, order(Date), `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test_correctness_clvdata_clvdata.R:384:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─CLVTools:::clv.data.make.repeat.transactions(...)
   10.   ├─...[]
   11.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_clvdata.R:408:3'): New faster mean.interpurchase.times same result as original implementation ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.helper.create.clvdata.cdnow() at test_correctness_clvdata_clvdata.R:408:3
   2.   └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   3.     └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   4.       ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_s3.R:34:3'): Summary has no NA ─────────────
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.helper.create.clvdata.cdnow() at test_correctness_clvdata_s3.R:34:3
   2.   └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   3.     └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   4.       ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_setdynamiccov.R:15:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test_correctness_clvdata_setdynamiccov.R:15:1
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─CLVTools::clvdata(apparelTrans, date.format = "ymd", time.unit = "w")
    8.   └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
    9.     ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   10.     └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvdata_setstaticcov.R:6:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.helper.create.clvdata.apparel.nocov() at test_correctness_clvdata_setstaticcov.R:6:1
   2.   └─CLVTools::clvdata(...) at ./helper_arrange.R:51:3
   3.     └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   4.       ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvtime.R:91:3'): Cov dates start and end correct for start off and end off period begin ──
  Error in ``[.data.table`(dt.cov.seq, , `:=`(Cov.Date, tp.cov.start + clv.time.number.timeunits.to.timeperiod(clv.time = clv.time, user.number.periods = period.offset)), by = "period.offset")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::clv.time.sequence.of.covariate.timepoints(...) at ./helper_testthat_correctness_clvtime.R:737:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvtime.R:92:3'): Cov dates start and end correct for start on and end off period begin ──
  Error in ``[.data.table`(dt.cov.seq, , `:=`(Cov.Date, tp.cov.start + clv.time.number.timeunits.to.timeperiod(clv.time = clv.time, user.number.periods = period.offset)), by = "period.offset")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::clv.time.sequence.of.covariate.timepoints(...) at ./helper_testthat_correctness_clvtime.R:767:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvtime.R:93:3'): Cov dates start and end correct for start off and end on period begin ──
  Error in ``[.data.table`(dt.cov.seq, , `:=`(Cov.Date, tp.cov.start + clv.time.number.timeunits.to.timeperiod(clv.time = clv.time, user.number.periods = period.offset)), by = "period.offset")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::clv.time.sequence.of.covariate.timepoints(...) at ./helper_testthat_correctness_clvtime.R:810:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvtime.R:94:3'): Cov dates start and end correct for start on and end on period begin ──
  Error in ``[.data.table`(dt.cov.seq, , `:=`(Cov.Date, tp.cov.start + clv.time.number.timeunits.to.timeperiod(clv.time = clv.time, user.number.periods = period.offset)), by = "period.offset")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::clv.time.sequence.of.covariate.timepoints(...) at ./helper_testthat_correctness_clvtime.R:855:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvtime.R:91:3'): Cov dates start and end correct for start off and end off period begin ──
  Error in ``[.data.table`(dt.cov.seq, , `:=`(Cov.Date, tp.cov.start + clv.time.number.timeunits.to.timeperiod(clv.time = clv.time, user.number.periods = period.offset)), by = "period.offset")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::clv.time.sequence.of.covariate.timepoints(...) at ./helper_testthat_correctness_clvtime.R:737:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvtime.R:92:3'): Cov dates start and end correct for start on and end off period begin ──
  Error in ``[.data.table`(dt.cov.seq, , `:=`(Cov.Date, tp.cov.start + clv.time.number.timeunits.to.timeperiod(clv.time = clv.time, user.number.periods = period.offset)), by = "period.offset")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::clv.time.sequence.of.covariate.timepoints(...) at ./helper_testthat_correctness_clvtime.R:767:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvtime.R:93:3'): Cov dates start and end correct for start off and end on period begin ──
  Error in ``[.data.table`(dt.cov.seq, , `:=`(Cov.Date, tp.cov.start + clv.time.number.timeunits.to.timeperiod(clv.time = clv.time, user.number.periods = period.offset)), by = "period.offset")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::clv.time.sequence.of.covariate.timepoints(...) at ./helper_testthat_correctness_clvtime.R:810:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvtime.R:94:3'): Cov dates start and end correct for start on and end on period begin ──
  Error in ``[.data.table`(dt.cov.seq, , `:=`(Cov.Date, tp.cov.start + clv.time.number.timeunits.to.timeperiod(clv.time = clv.time, user.number.periods = period.offset)), by = "period.offset")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::clv.time.sequence.of.covariate.timepoints(...) at ./helper_testthat_correctness_clvtime.R:855:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_clvtime.R:99:1'): Correctly works for single or two periods ──
  Error in ``[.data.table`(dt.cov.seq, , `:=`(Cov.Date, tp.cov.start + clv.time.number.timeunits.to.timeperiod(clv.time = clv.time, user.number.periods = period.offset)), by = "period.offset")`: attempt access index 1/1 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at ./helper_testthat_correctness_clvtime.R:895:5
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─CLVTools:::clv.time.sequence.of.covariate.timepoints(...)
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_gg.R:5:1'): (code run outside of `test_that()`) ────
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.testthat.correctness.clvfittedspending(...) at test_correctness_gg.R:5:1
   2.   └─CLVTools:::fct.helper.create.clvdata.cdnow(estimation.split = 37) at ./helper_testthat_correctness_spending.R:34:3
   3.     └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   4.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   5.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_ggomnbd.R:7:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.testthat.correctness.clvfittedtransactions(...) at test_correctness_ggomnbd.R:7:1
   2.   └─CLVTools:::fct.helper.create.clvdata.cdnow() at ./helper_testthat_correctness_transactions.R:368:3
   3.     └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   4.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   5.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test_correctness_pnbd_nocovstaticcov.R:5:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.testthat.correctness.clvfittedtransactions(...) at test_correctness_pnbd_nocovstaticcov.R:5:1
   2.   └─CLVTools:::fct.helper.create.clvdata.cdnow() at ./helper_testthat_correctness_transactions.R:368:3
   3.     └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   4.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   5.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test_inputchecks_bgnbd_nocov.R:13:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.testthat.inputchecks.clvfittedtransactions.nocov(...) at test_inputchecks_bgnbd_nocov.R:13:1
   2.   └─CLVTools:::fct.helper.create.clvdata.cdnow(estimation.split = NULL) at ./helper_testthat_inputchecks_nocov.R:262:3
   3.     └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   4.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   5.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test_inputchecks_bootstrapping.R:5:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fit.cdnow(model = bgnbd) at test_inputchecks_bootstrapping.R:5:1
   2.   └─CLVTools:::fct.helper.create.clvdata.cdnow(...) at ./helper_arrange.R:135:3
   3.     └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   4.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   5.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test_inputchecks_clvdata_setstaticcov.R:5:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test_inputchecks_clvdata_setstaticcov.R:5:1
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─CLVTools::clvdata(apparelTrans, date.format = "ymd", time.unit = "w")
   10.   └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   11.     ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   12.     └─data.table:::`[.data.table`(...)
  ── Error ('test_inputchecks_gg.R:11:1'): (code run outside of `test_that()`) ───
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.testthat.inputchecks.clvfittedspending.nocov(...) at test_inputchecks_gg.R:11:1
   2.   └─CLVTools:::fct.helper.create.clvdata.cdnow(estimation.split = NULL) at ./helper_testthat_inputchecks_nocov.R:293:3
   3.     └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   4.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   5.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test_inputchecks_ggomnbd_nocov.R:16:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.testthat.inputchecks.clvfittedtransactions.nocov(...) at test_inputchecks_ggomnbd_nocov.R:16:1
   2.   └─CLVTools:::fct.helper.create.clvdata.cdnow(estimation.split = NULL) at ./helper_testthat_inputchecks_nocov.R:262:3
   3.     └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   4.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   5.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test_inputchecks_pnbd_nocov.R:8:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.testthat.inputchecks.clvfittedtransactions.nocov(...) at test_inputchecks_pnbd_nocov.R:8:1
   2.   └─CLVTools:::fct.helper.create.clvdata.cdnow(estimation.split = NULL) at ./helper_testthat_inputchecks_nocov.R:262:3
   3.     └─CLVTools::clvdata(...) at ./helper_arrange.R:31:3
   4.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   5.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test_inputchecks_predict_spending.R:22:3'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools (local) fct.testthat.inputchecks.clvfittedspending.predict() at test_inputchecks_predict_spending.R:41:1
   2.   └─CLVTools:::fct.helper.create.clvdata.apparel.staticcov() at test_inputchecks_predict_spending.R:22:3
   3.     ├─CLVTools::SetStaticCovariates(...) at ./helper_arrange.R:74:3
   4.     │ └─methods::is(clv.data, "clv.data")
   5.     └─CLVTools::clvdata(...)
   6.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   7.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   8.         └─data.table:::`[.data.table`(...)
  ── Error ('test_inputchecks_predict_transactions.R:108:3'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools (local) fct.testthat.inputchecks.clvfittedtransactions.predict() at test_inputchecks_predict_transactions.R:158:1
   2.   └─CLVTools:::fct.helper.create.clvdata.apparel.staticcov() at test_inputchecks_predict_transactions.R:108:3
   3.     ├─CLVTools::SetStaticCovariates(...) at ./helper_arrange.R:74:3
   4.     │ └─methods::is(clv.data, "clv.data")
   5.     └─CLVTools::clvdata(...)
   6.       └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   7.         ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   8.         └─data.table:::`[.data.table`(...)
  ── Error ('test_runability_clvdata_clvdata.R:161:3'): Works with different time.units ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test_runability_clvdata_clvdata.R:161:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─CLVTools::clvdata(...)
   10.   └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   11.     ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   12.     └─data.table:::`[.data.table`(...)
  ── Error ('test_runability_clvdata_clvdata.R:280:3'): Works with data.end and time.units hours, days, years ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(do.call(clvdata, l.args)) at test_runability_clvdata_clvdata.R:280:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─base::do.call(clvdata, l.args)
   10. └─CLVTools (local) `<fn>`(...)
   11.   └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   12.     ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   13.     └─data.table:::`[.data.table`(...)
  ── Error ('test_runability_clvdata_setstaticcov.R:7:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dt.repeat.transactions, , `:=`(trans_num, seq(.N)), by = "Id")`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─CLVTools:::fct.helper.create.clvdata.apparel.nocov(estimation.split = NULL) at test_runability_clvdata_setstaticcov.R:7:1
   2.   └─CLVTools::clvdata(...) at ./helper_arrange.R:51:3
   3.     └─CLVTools:::clv.data.make.repeat.transactions(dt.transactions = dt.trans)
   4.       ├─dt.repeat.transactions[, `:=`(trans_num, seq(.N)), by = "Id"]
   5.       └─data.table:::`[.data.table`(...)
  
  [ FAIL 36 | WARN 0 | SKIP 87 | PASS 863 ]
  Error:
  ! Test failures.
  Execution halted