Running ‘testthat.R’ [101s/124s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(vital)
  > library(dplyr)
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  > 
  > test_check("vital")
  [ FAIL 6 | WARN 65 | SKIP 1 | PASS 78 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • empty test (1): 'test-collapse_ages.R:3:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-FDM.R:19:5'): Functional data model ──────────────────────────
  dplyr::pull(...) not equal to 0.00246.
  1/1 mismatches
  [1] NA - 0.00246 == NA
  ── Error ('test-FDM.R:22:5'): Functional data model ────────────────────────────
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(.tbl, !!!funs)`: ℹ In argument: `hu = (function (object, ...) ...`.
  Caused by error in `purrr::map()`:
  ℹ In index: 1.
  ℹ With name: beta1.
  Caused by error in `sample.int()`:
  ! invalid first argument
  ── Failure ('test-coherent-forecast.R:31:3'): Coherent forecasts ───────────────
  mean(fc1$diff) is not strictly less than 0.002. Difference: NA
  ── Failure ('test-coherent.R:34:3'): Coherent functional data model ────────────
  pr1$Sex[stationary] not identical to c("female", "male").
  Lengths differ: 3 is not 2
  ── Failure ('test-coherent.R:35:3'): Coherent functional data model ────────────
  pr1$Sex[!stationary] not identical to "geometric_mean".
  Lengths differ: 0 is not 1
  ── Failure ('test-coherent.R:39:3'): Coherent functional data model ────────────
  all(!stationary) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  
  [ FAIL 6 | WARN 65 | SKIP 1 | PASS 78 ]
  Error: Test failures
  Execution halted