Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(CPAT)
  Package 'CPAT' version 0.1.0
  Type citation("CPAT") for citing this R package in publications
  > 
  > test_check("CPAT")
  [ FAIL 4 | WARN 12 | SKIP 5 | PASS 98 ]
  
  ══ Skipped tests (5) ═══════════════════════════════════════════════════════════
  • cointReg not available (5): 'test-TestStatisticsFunctions.R:74:3',
    'test-TestStatisticsFunctions.R:102:3',
    'test-TestStatisticsFunctions.R:130:3',
    'test-TestStatisticsFunctions.R:159:3',
    'test-TestStatisticsFunctions.R:201:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-ProbabilityFunctions.R:131:3'): Simulation functions work ──────
  Error in `get_lrv_vec(dat, kernel, bandwidth)`: object 'h' not found
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test-ProbabilityFunctions.R:131:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─CPAT:::sim_Vn_stat(...)
    5.   └─base::sapply(1:size, function(throwaway) Vn_realization())
    6.     └─base::lapply(X = X, FUN = FUN, ...)
    7.       └─CPAT (local) FUN(X[[i]], ...)
    8.         └─CPAT (local) Vn_realization()
    9.           └─CPAT:::stat_Vn(...)
   10.             └─CPAT:::get_lrv_vec(dat, kernel, bandwidth)
   11.               └─CPAT:::getLongRunWeights(n, kernel = kernel, bandwidth = h)
  ── Error ('test-TestStatisticsFunctions.R:223:3'): CUSUM.test() functions properly ──
  Error in `get_lrv_vec(dat, kernel, bandwidth)`: object 'h' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-TestStatisticsFunctions.R:223:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─CPAT::CUSUM.test(dat, use_kernel_var = TRUE)
   5.   └─CPAT:::stat_Vn(...)
   6.     └─CPAT:::get_lrv_vec(dat, kernel, bandwidth)
   7.       └─CPAT:::getLongRunWeights(n, kernel = kernel, bandwidth = h)
  ── Error ('test-TestStatisticsFunctions.R:234:3'): HR.test() functions properly ──
  Error in `get_lrv_vec(dat, kernel, bandwidth)`: object 'h' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-TestStatisticsFunctions.R:234:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─CPAT::HR.test(dat, use_kernel_var = TRUE)
   5.   └─CPAT:::stat_Zn(...)
   6.     └─CPAT:::get_lrv_vec(dat, kernel, bandwidth)
   7.       └─CPAT:::getLongRunWeights(n, kernel = kernel, bandwidth = h)
  ── Error ('test-TestStatisticsFunctions.R:246:3'): DE.test() functions properly ──
  Error in `get_lrv_vec(dat, kernel, bandwidth)`: object 'h' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-TestStatisticsFunctions.R:246:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─CPAT::DE.test(dat, use_kernel_var = TRUE)
   5.   └─CPAT:::stat_de(...)
   6.     └─CPAT:::stat_Vn(...)
   7.       └─CPAT:::get_lrv_vec(dat, kernel, bandwidth)
   8.         └─CPAT:::getLongRunWeights(n, kernel = kernel, bandwidth = h)
  
  [ FAIL 4 | WARN 12 | SKIP 5 | PASS 98 ]
  Error: Test failures
  Execution halted