Running ‘testthat.R’ [2s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(data.table)
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  > testthat::test_check('wmm')
  Loading required package: wmm
  Saving _problems/testWMM-29.R
  Saving _problems/testWMM-48.R
  Saving _problems/testWMM-69.R
  Saving _problems/testWMM-75.R
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 5 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('testWMM.R:17:5'): warns: is in the blackout zone ────────────────────
  Error in ``[.data.table`(testData, rn, `:=`((calculatedFields), GetMagneticFieldWMM(lon = lon, lat = lat, height = height * 1000, time = year, wmmVersion = wmmVersion)), by = testID)`: attempt access index 17/17 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at testWMM.R:17: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. ├─...[]
   7. └─data.table:::`[.data.table`(...)
  ── Error ('testWMM.R:36:5'): warns: is approaching the blackout zone ───────────
  Error in ``[.data.table`(testData, rn, `:=`((calculatedFields), GetMagneticFieldWMM(lon = lon, lat = lat, height = height * 1000, time = year, wmmVersion = wmmVersion)), by = testID)`: attempt access index 17/17 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at testWMM.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. ├─...[]
   7. └─data.table:::`[.data.table`(...)
  ── Error ('testWMM.R:54:3'): no warnings ───────────────────────────────────────
  Error in ``[.data.table`(testData, h >= 6000, `:=`((calculatedFields), GetMagneticFieldWMM(lon = lon, lat = lat, height = height * 1000, time = year, wmmVersion = wmmVersion)), by = testID)`: attempt access index 17/17 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at testWMM.R:54: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. ├─...[]
   10. └─data.table:::`[.data.table`(...)
  ── Error ('testWMM.R:69:3'): nothing missed ────────────────────────────────────
  Error in ``[.data.table`(testData, , c(calculatedFields), with = FALSE)`: columns not found: [xCalculated, yCalculated, zCalculated, xDotCalculated, yDotCalculated, zDotCalculated]
  Backtrace:
      ▆
   1. ├─testthat::expect_false(...) at testWMM.R:69:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─testData[, c(calculatedFields), with = FALSE]
   5. └─data.table:::`[.data.table`(...)
   6.   └─data.table:::stopf(...)
   7.     └─data.table:::raise_condition(...)
  ── Error ('testWMM.R:73:1'): (code run outside of `test_that()`) ───────────────
  Error: value for 'xCalculated' not found
  Backtrace:
      ▆
   1. ├─data.table::copy(testData)[, mget(c(keyFields, calculatedFields))] at testWMM.R:73:1
   2. └─data.table:::`[.data.table`(...) at testWMM.R:73:1
   3.   └─base::eval(jsub, SDenv, parent.frame())
   4.     └─base::eval(jsub, SDenv, parent.frame())
   5.       └─base::mget(c(keyFields, calculatedFields))
   6.         └─base (local) `<fn>`("xCalculated")
  
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 5 ]
  Error:
  ! Test failures.
  Execution halted