Running ‘testthat.R’ [8s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mortAAR)
  > 
  > test_check("mortAAR")
  ── 1. Error: life.table warns if more age correction values than age classes are
  replacement has 11 rows, data has 10
  1: expect_message(suppressWarnings(life.table(data.frame(x = 1:10, a = 1:10, Dx = 1:10), 
         agecorfac = 1:11)), "There can not be more age correction factors") at testthat/test_analytical_functions_api.R:44
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: suppressWarnings(life.table(data.frame(x = 1:10, a = 1:10, Dx = 1:10), agecorfac = 1:11))
  7: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  8: life.table(data.frame(x = 1:10, a = 1:10, Dx = 1:10), agecorfac = 1:11)
  9: life.table.df(necdf[, vars], agecor = agecor, agecorfac = agecorfac)
  10: `[<-`(`*tmp*`, 1:length(agecorfac), , value = c(1L, 4L, 9L, 16L, 25L, 36L, 49L, 64L, 
     81L, 100L, NA))
  11: `[<-.data.frame`(`*tmp*`, 1:length(agecorfac), , value = c(1L, 4L, 9L, 16L, 25L, 
     36L, 49L, 64L, 81L, 100L, NA))
  12: xpdrows.data.frame(x, rows, new.rows)
  13: `[[<-`(`*tmp*`, i, value = c(0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, NA))
  14: `[[<-.data.frame`(`*tmp*`, i, value = c(0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, NA
     ))
  15: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 86 SKIPPED: 0 FAILED: 1
  1. Error: life.table warns if more age correction values than age classes are given (@test_analytical_functions_api.R#44) 
  
  Error: testthat unit tests failed
  Execution halted