Running ‘testthat.R’ [7s/14s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(getTBinR)
  > 
  > test_check("getTBinR")
  ── 1. Error: map_tb_burden produces an interactive plot (@test-map_tb_burden.R#6
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: map_tb_burden(interactive = TRUE) at testthat/test-map_tb_burden.R:69
  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: unitConvert(theme$plot.margin, "pixels")
  9: grid::convertHeight(u, "npc")
  10: convertUnit(x, unitTo, "y", "dimension", "y", "dimension", valueOnly = valueOnly)
  11: grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), valid.units(unitTo))
  
  ── 2. Error: plot_tb_burden produces an interactive plot (@test-plot_tb_burden.R
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_tb_burden(interactive = TRUE) at testthat/test-plot_tb_burden.R:40
  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: unitConvert(theme$plot.margin, "pixels")
  9: grid::convertHeight(u, "npc")
  10: convertUnit(x, unitTo, "y", "dimension", "y", "dimension", valueOnly = valueOnly)
  11: grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), valid.units(unitTo))
  
  ── 3. Error: plot_tb_burden_overview produces an interactive plot (@test-plot_tb
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_tb_burden_overview(interactive = TRUE) at testthat/test-plot_tb_burden_overview.R:33
  2: plotly::ggplotly(plot) %>% style(hoverlabel = list(bgcolor = "white"), hoveron = "fill")
  3: eval(lhs, parent, parent)
  4: eval(lhs, parent, parent)
  5: plotly::ggplotly(plot)
  6: ggplotly.ggplot(plot)
  7: gg2list(p, width = width, height = height, tooltip = tooltip, dynamicTicks = dynamicTicks, 
         layerData = layerData, originalData = originalData, source = source, ...)
  8: unitConvert(theme$plot.margin, "pixels")
  9: grid::convertHeight(u, "npc")
  10: convertUnit(x, unitTo, "y", "dimension", "y", "dimension", valueOnly = valueOnly)
  11: grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), valid.units(unitTo))
  
  ── 4. Error: plot_tb_burden_summary produces an interactive plot (@test-plot_tb_
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_tb_burden_summary(interactive = TRUE) at testthat/test-plot_tb_burden_summary.R:24
  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: unitConvert(theme$plot.margin, "pixels")
  9: grid::convertHeight(u, "npc")
  10: convertUnit(x, unitTo, "y", "dimension", "y", "dimension", valueOnly = valueOnly)
  11: grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), valid.units(unitTo))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 80 SKIPPED: 37 FAILED: 4
  1. Error: map_tb_burden produces an interactive plot (@test-map_tb_burden.R#69) 
  2. Error: plot_tb_burden produces an interactive plot (@test-plot_tb_burden.R#40) 
  3. Error: plot_tb_burden_overview produces an interactive plot (@test-plot_tb_burden_overview.R#33) 
  4. Error: plot_tb_burden_summary produces an interactive plot (@test-plot_tb_burden_summary.R#24) 
  
  Error: testthat unit tests failed
  Execution halted