Running ‘testthat.R’ [27s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > 
  > 
  > library(testthat)
  > test_check("Rcan")
  Loading required package: Rcan
  Type example(Rcan) to see demo of the function.
  
  Population with less than 18 age group:
  
   country country_label type nb_age_group
      7600        Brazil    1           17
      7600        Brazil    2           16
     18800    Costa Rica    1           16
     21800       Ecuador    1           16
  
  ASR have been computed for the age group 0-99+
  ── 1. Error: Test age specific: 1 (@test-Rcan.R#32)  ───────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: csu_ageSpecific(data_test, plot_title = "Colombia, Liver, male") at testthat/test-Rcan.R:32
  2: print(csu_list$csu_plot)
  3: print.ggplot(csu_list$csu_plot)
  4: grid.draw(gtable)
  5: grid.draw.gTree(gtable)
  6: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  7: drawGTree(x)
  8: preDraw(x)
  9: preDraw.gTree(x)
  10: pushvpgp(x)
  11: pushgrobvp(x$vp)
  12: pushgrobvp.viewport(x$vp)
  13: pushViewport(vp, recording = FALSE)
  14: lapply(vps, push.vp, recording)
  15: FUN(X[[i]], ...)
  16: push.vp.viewport(X[[i]], ...)
  17: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ASR have been computed for the age group 0-99+
  ── 2. Error: Test trend: 1 (@test-Rcan.R#58)  ──────────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: csu_time_trend(data_test, group_by = "sex", logscale = TRUE, plot_title = "Colombia, Liver", 
         smoothing = 0.3) at testthat/test-Rcan.R:58
  2: print(csu_list$csu_plot)
  3: print.ggplot(csu_list$csu_plot)
  4: ggplot_gtable(data)
  5: ggplot_gtable.ggplot_built(data)
  6: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  7: guides_gengrob(gdefs, theme)
  8: lapply(gdefs, guide_gengrob, theme)
  9: FUN(X[[i]], ...)
  10: guide_gengrob.legend(X[[i]], ...)
  ...
  19: pushvpgp(x)
  20: pushgrobvp(x$vp)
  21: pushgrobvp.viewport(x$vp)
  22: pushViewport(vp, recording = FALSE)
  23: lapply(vps, push.vp, recording)
  24: FUN(X[[i]], ...)
  25: push.vp.vpTree(X[[i]], ...)
  26: push.vp(vp$parent, recording)
  27: push.vp.viewport(vp$parent, recording)
  28: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  
  Population with less than 18 age group:
  
                           registry_label nb_age_group
                          Brazil, Goiania           17
                    China, Jiashan County           16
                               Costa Rica           16
                           Ecuador, Quito           16
                                  Iceland           16
                  India, Chennai (Madras)           16
                   India, Mumbay (Bombay)           16
                             India, Poona           16
                             Israel: Jews           16
                             Italy, Parma           17
                   Italy, Ragusa Province           17
                      Philippines, Manila           16
                      Poland, Cracow City           17
                                Singapore           17
                       Singapore: Chinese           17
                         Singapore: Malay           17
                                 Slovenia           17
                     Thailand, Chiang Mai           16
                       Thailand, Songkhla           16
                  Uganda, Kyadondo County           16
    USA, California, Los Angeles: Chinese           16
   USA, California, Los Angeles: Filipino           16
   USA, California, Los Angeles: Japanese           16
     USA, California, Los Angeles: Korean           16
    USA, California, San Francisco: Black           17
                  USA, Connecticut: Black           16
             USA, Georgia, Atlanta: Black           17
                           registry_label nb_age_group
  
  ASR have been computed for the age group 0-99+
  EAPC with  95 % CI level have been computed
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 2 SKIPPED: 0 FAILED: 2
  1. Error: Test age specific: 1 (@test-Rcan.R#32) 
  2. Error: Test trend: 1 (@test-Rcan.R#58) 
  
  Error: testthat unit tests failed
  Execution halted