Running ‘testthat.R’ [15s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(MetaComp)
  > 
  > test_check("MetaComp")
  [1] "gottcha"
  [1] "kraken"
  ── 1. Error: (unknown) (@test_pipeline.R#28)  ──────────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_merged_assignment(assignment = merged_assignments_table, taxonomy_level = "family", 
         sorting_order = "abundance", row_limit = 60, plot_title = "Test Plot #3", filename = file.path(tmp_folder, 
             "test_pdf3")) at testthat/test_pipeline.R:28
  2: suppressWarnings(print(p))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  4: print(p)
  5: print.ggplot(p)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  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)
  
  ── 2. Error: (unknown) (@test_plot_bwa_assignment.R#18)  ───────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_edge_assignment(dat, "family", "Test Plot #1", "SSputum-no-cDNA", file.path(tmp_folder, 
         "test_pdf")) at testthat/test_plot_bwa_assignment.R:18
  2: print(p)
  3: print.ggplot(p)
  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.colorbar(X[[i]], ...)
  ...
  17: pushvpgp(x)
  18: pushgrobvp(x$vp)
  19: pushgrobvp.viewport(x$vp)
  20: pushViewport(vp, recording = FALSE)
  21: lapply(vps, push.vp, recording)
  22: FUN(X[[i]], ...)
  23: push.vp.vpTree(X[[i]], ...)
  24: push.vp(vp$parent, recording)
  25: push.vp.viewport(vp$parent, recording)
  26: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 3. Error: (unknown) (@test_plot_diamond_assignment.R#18)  ───────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_edge_assignment(dat, "superkingdom", "Test Plot #1", "HMP stagger", file.path(tmp_folder, 
         "test_pdf")) at testthat/test_plot_diamond_assignment.R:18
  2: print(p)
  3: print.ggplot(p)
  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.colorbar(X[[i]], ...)
  ...
  17: pushvpgp(x)
  18: pushgrobvp(x$vp)
  19: pushgrobvp.viewport(x$vp)
  20: pushViewport(vp, recording = FALSE)
  21: lapply(vps, push.vp, recording)
  22: FUN(X[[i]], ...)
  23: push.vp.vpTree(X[[i]], ...)
  24: push.vp(vp$parent, recording)
  25: push.vp.viewport(vp$parent, recording)
  26: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 4. Error: (unknown) (@test_plot_gottcha_assignment.R#18)  ───────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_edge_assignment(dat, "family", "Test Plot #1", "allReads-gottcha-strDB-b", file.path(tmp_folder, 
         "test_pdf")) at testthat/test_plot_gottcha_assignment.R:18
  2: print(p)
  3: print.ggplot(p)
  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.colorbar(X[[i]], ...)
  ...
  17: pushvpgp(x)
  18: pushgrobvp(x$vp)
  19: pushgrobvp.viewport(x$vp)
  20: pushViewport(vp, recording = FALSE)
  21: lapply(vps, push.vp, recording)
  22: FUN(X[[i]], ...)
  23: push.vp.vpTree(X[[i]], ...)
  24: push.vp(vp$parent, recording)
  25: push.vp.viewport(vp$parent, recording)
  26: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 5. Error: (unknown) (@test_plot_kraken_assignment.R#18)  ────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_edge_assignment(dat, "family", "Test Plot #1", "SSputum-no-cDNA", file.path(tmp_folder, 
         "test_pdf")) at testthat/test_plot_kraken_assignment.R:18
  2: print(p)
  3: print.ggplot(p)
  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.colorbar(X[[i]], ...)
  ...
  17: pushvpgp(x)
  18: pushgrobvp(x$vp)
  19: pushgrobvp.viewport(x$vp)
  20: pushViewport(vp, recording = FALSE)
  21: lapply(vps, push.vp, recording)
  22: FUN(X[[i]], ...)
  23: push.vp.vpTree(X[[i]], ...)
  24: push.vp(vp$parent, recording)
  25: push.vp.viewport(vp$parent, recording)
  26: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 6. Error: (unknown) (@test_plot_merged_assignment_b.R#73)  ──────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_merged_assignment(assignment = merged, taxonomy_level = "species", sorting_order = "abundance", 
         row_limit = 60, plot_title = "Test Plot #2", filename = file.path(tmp_folder, 
             "test_pdf3")) at testthat/test_plot_merged_assignment_b.R:73
  2: suppressWarnings(print(p))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  4: print(p)
  5: print.ggplot(p)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  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)
  
  ── 7. Error: (unknown) (@test_plot_merged_assignment_d.R#73)  ──────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_merged_assignment(assignment = merged, taxonomy_level = "class", sorting_order = "alphabetical", 
         row_limit = 60, plot_title = "Test Plot #3", filename = file.path(tmp_folder, 
             "test_pdf3")) at testthat/test_plot_merged_assignment_d.R:73
  2: suppressWarnings(print(p))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  4: print(p)
  5: print.ggplot(p)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  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)
  
  ── 8. Error: (unknown) (@test_plot_merged_assignment_g.R#71)  ──────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_merged_assignment(assignment = merged, taxonomy_level = "family", sorting_order = "abundance", 
         row_limit = 60, plot_title = "Test Plot #2", filename = file.path(tmp_folder, 
             "test_pdf2")) at testthat/test_plot_merged_assignment_g.R:71
  2: suppressWarnings(print(p))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  4: print(p)
  5: print.ggplot(p)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  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)
  
  ── 9. Error: (unknown) (@test_plot_merged_assignment_g2.R#71)  ─────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_merged_assignment(assignment = merged, taxonomy_level = "family", sorting_order = "abundance", 
         row_limit = 60, plot_title = "Test Plot #2", filename = file.path(tmp_folder, 
             "test_pdf2")) at testthat/test_plot_merged_assignment_g2.R:71
  2: suppressWarnings(print(p))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  4: print(p)
  5: print.ggplot(p)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  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)
  
  ── 10. Error: (unknown) (@test_plot_merged_assignment_k.R#73)  ─────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_merged_assignment(assignment = merged, taxonomy_level = "family", sorting_order = "alphabetical", 
         row_limit = 60, plot_title = "Test Plot #3", filename = file.path(tmp_folder, 
             "test_pdf3")) at testthat/test_plot_merged_assignment_k.R:73
  2: suppressWarnings(print(p))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  4: print(p)
  5: print.ggplot(p)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  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)
  
  ── 11. Error: (unknown) (@test_plot_merged_assignment_m.R#73)  ─────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_merged_assignment(assignment = merged, taxonomy_level = "species", sorting_order = "alphabetical", 
         row_limit = 60, plot_title = "Test Plot #3", filename = file.path(tmp_folder, 
             "test_pdf3")) at testthat/test_plot_merged_assignment_m.R:73
  2: suppressWarnings(print(p))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  4: print(p)
  5: print.ggplot(p)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  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)
  
  ── 12. Error: (unknown) (@test_plot_merged_assignment_p.R#74)  ─────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_merged_assignment(assignment = merged, taxonomy_level = "family", sorting_order = "alphabetical", 
         row_limit = 60, plot_title = "Test Plot #3", filename = file.path(tmp_folder, 
             "test_pdf3")) at testthat/test_plot_merged_assignment_p.R:74
  2: suppressWarnings(print(p))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  4: print(p)
  5: print.ggplot(p)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  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)
  
  ── 13. Error: (unknown) (@test_plot_metaphlan_assignment.R#18)  ────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_edge_assignment(dat, "family", "Test Plot #1", "SSputum-no-cDNA", file.path(tmp_folder, 
         "test_pdf")) at testthat/test_plot_metaphlan_assignment.R:18
  2: print(p)
  3: print.ggplot(p)
  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.colorbar(X[[i]], ...)
  ...
  17: pushvpgp(x)
  18: pushgrobvp(x$vp)
  19: pushgrobvp.viewport(x$vp)
  20: pushViewport(vp, recording = FALSE)
  21: lapply(vps, push.vp, recording)
  22: FUN(X[[i]], ...)
  23: push.vp.vpTree(X[[i]], ...)
  24: push.vp(vp$parent, recording)
  25: push.vp.viewport(vp$parent, recording)
  26: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 14. Error: (unknown) (@test_plot_pangia_assignment.R#18)  ───────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_edge_assignment(dat, "genus", "Test Plot #1", "HMP stagger", file.path(tmp_folder, 
         "test_pdf")) at testthat/test_plot_pangia_assignment.R:18
  2: print(p)
  3: print.ggplot(p)
  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.colorbar(X[[i]], ...)
  ...
  17: pushvpgp(x)
  18: pushgrobvp(x$vp)
  19: pushgrobvp.viewport(x$vp)
  20: pushViewport(vp, recording = FALSE)
  21: lapply(vps, push.vp, recording)
  22: FUN(X[[i]], ...)
  23: push.vp.vpTree(X[[i]], ...)
  24: push.vp(vp$parent, recording)
  25: push.vp.viewport(vp$parent, recording)
  26: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 117 SKIPPED: 0 FAILED: 14
  1. Error: (unknown) (@test_pipeline.R#28) 
  2. Error: (unknown) (@test_plot_bwa_assignment.R#18) 
  3. Error: (unknown) (@test_plot_diamond_assignment.R#18) 
  4. Error: (unknown) (@test_plot_gottcha_assignment.R#18) 
  5. Error: (unknown) (@test_plot_kraken_assignment.R#18) 
  6. Error: (unknown) (@test_plot_merged_assignment_b.R#73) 
  7. Error: (unknown) (@test_plot_merged_assignment_d.R#73) 
  8. Error: (unknown) (@test_plot_merged_assignment_g.R#71) 
  9. Error: (unknown) (@test_plot_merged_assignment_g2.R#71) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted