Running ‘testthat.R’ [8s/24s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(getTBinR)
  > 
  > test_check("getTBinR")
  trying URL 'https://extranet.who.int/tme/generateCSV.asp?ds=estimates'
  downloaded 772 KB
  
  trying URL 'https://extranet.who.int/tme/generateCSV.asp?ds=dictionary'
  downloaded 54 KB
  
  trying URL 'https://extranet.who.int/tme/generateCSV.asp?ds=estimates'
  downloaded 772 KB
  
  ── 1. Error: map_tb_burden produces an interactive plot (@test-map_tb_burden.R#5
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: map_tb_burden(interactive = TRUE) at testthat/test-map_tb_burden.R:56
  2: plotly::ggplotly(plot, source = "WorldMap") %>% style(hoverlabel = list(bgcolor = "white"), 
         hoveron = "fill")
  3: eval(lhs, parent, parent)
  4: eval(lhs, parent, parent)
  5: plotly::ggplotly(plot, source = "WorldMap")
  6: ggplotly.ggplot(plot, source = "WorldMap")
  7: gg2list(p, width = width, height = height, tooltip = tooltip, dynamicTicks = dynamicTicks, 
         layerData = layerData, originalData = originalData, source = source, ...)
  8: gg2list_legacy(p, width = width, height = height, tooltip = tooltip, layerData = layerData, 
         originalData = originalData, source = source, ...)
  9: layers2traces(data, prestats_data, layout$panel_layout, plot)
  10: Map(geom2trace, dl, paramz[i], list(p))
  11: mapply(FUN = f, ..., SIMPLIFY = FALSE)
  12: (function (data, params, p) 
     {
         if (nrow(data) == 0) 
             return(geom2trace.GeomBlank(data, params, p))
         UseMethod("geom2trace")
     })(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]])
  13: geom2trace.GeomPolygon(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]])
  14: group2NA(data)
  15: dt[, c(.I, .I[1], NA), by = keyVars]
  16: `[.data.table`(dt, , c(.I, .I[1], NA), by = keyVars)
  
  ── 2. Error: plot_tb_burden produces an interactive plot (@test-plot_tb_burden.R
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: plot_tb_burden(interactive = TRUE) at testthat/test-plot_tb_burden.R:25
  2: ggplotly(plot) %>% style(hoverlabel = list(bgcolor = "white"), hoveron = "fill")
  3: eval(lhs, parent, parent)
  4: eval(lhs, parent, parent)
  5: ggplotly(plot)
  6: ggplotly.ggplot(plot)
  7: gg2list(p, width = width, height = height, tooltip = tooltip, dynamicTicks = dynamicTicks, 
         layerData = layerData, originalData = originalData, source = source, ...)
  8: gg2list_legacy(p, width = width, height = height, tooltip = tooltip, layerData = layerData, 
         originalData = originalData, source = source, ...)
  9: layers2traces(data, prestats_data, layout$panel_layout, plot)
  10: Map(geom2trace, dl, paramz[i], list(p))
  11: mapply(FUN = f, ..., SIMPLIFY = FALSE)
  12: (function (data, params, p) 
     {
         if (nrow(data) == 0) 
             return(geom2trace.GeomBlank(data, params, p))
         UseMethod("geom2trace")
     })(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]])
  13: geom2trace.GeomPath(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]])
  14: group2NA(data)
  15: dt[, c(.I, NA), by = keyVars]
  16: `[.data.table`(dt, , c(.I, NA), by = keyVars)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 76 SKIPPED: 7 FAILED: 2
  1. Error: map_tb_burden produces an interactive plot (@test-map_tb_burden.R#56) 
  2. Error: plot_tb_burden produces an interactive plot (@test-plot_tb_burden.R#25) 
  
  Error: testthat unit tests failed
  Execution halted