Running ‘spelling.R’ [0s/1s]
  Running ‘testthat.R’ [5s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(gghdr)
  > library(ggplot2)
  > library(vdiffr)
  > 
  > test_check("gghdr")
  [ FAIL 3 | WARN 6 | SKIP 1 | PASS 8 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-hdr_bin.R:34:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-draw_key_hdr_boxplot.R:11:3'): alternative key glyphs work ─────
  Error in `if (guide$reverse) {
      key <- key[nrow(key):1, ]
  }`: argument is of length zero
  Backtrace:
       ▆
    1. └─vdiffr::expect_doppelganger("hdr key glyphs", hdr_boxplot) at test-draw_key_hdr_boxplot.R:11:3
    2.   └─vdiffr (local) writer(fig, testcase, title)
    3.     ├─vdiffr:::print_plot(plot, title)
    4.     └─vdiffr:::print_plot.ggplot(plot, title)
    5.       ├─base::print(p)
    6.       └─ggplot2:::print.ggplot(p)
    7.         ├─ggplot2::ggplot_build(x)
    8.         └─ggplot2:::ggplot_build.ggplot(x)
    9.           └─plot$guides$build(npscales, plot$layers, plot$labels, data)
   10.             └─ggplot2 (local) build(..., self = self)
   11.               └─guides$train(scales, labels)
   12.                 └─ggplot2 (local) train(..., self = self)
   13.                   └─base::Map(...)
   14.                     └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   15.                       └─ggplot2 (local) `<fn>`(...)
   16.                         └─guide$train(param, scale, aes, title = labels[[aes]])
   17.                           └─ggplot2 (local) train(..., self = self)
   18.                             ├─ggplot2::guide_train(params, scale, aesthetic)
   19.                             └─gghdr:::guide_train.prob_guide(params, scale, aesthetic)
  ── Error ('test-geom-hdr-rug.R:9:3'): hdr rug plot draws correctly ─────────────
  Error in `if (guide$reverse) {
      key <- key[nrow(key):1, ]
  }`: argument is of length zero
  Backtrace:
       ▆
    1. └─vdiffr::expect_doppelganger("hdr rugplot", hdr_rugplot) at test-geom-hdr-rug.R:9:3
    2.   └─vdiffr (local) writer(fig, testcase, title)
    3.     ├─vdiffr:::print_plot(plot, title)
    4.     └─vdiffr:::print_plot.ggplot(plot, title)
    5.       ├─base::print(p)
    6.       └─ggplot2:::print.ggplot(p)
    7.         ├─ggplot2::ggplot_build(x)
    8.         └─ggplot2:::ggplot_build.ggplot(x)
    9.           └─plot$guides$build(npscales, plot$layers, plot$labels, data)
   10.             └─ggplot2 (local) build(..., self = self)
   11.               └─guides$train(scales, labels)
   12.                 └─ggplot2 (local) train(..., self = self)
   13.                   └─base::Map(...)
   14.                     └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   15.                       └─ggplot2 (local) `<fn>`(...)
   16.                         └─guide$train(param, scale, aes, title = labels[[aes]])
   17.                           └─ggplot2 (local) train(..., self = self)
   18.                             ├─ggplot2::guide_train(params, scale, aesthetic)
   19.                             └─gghdr:::guide_train.prob_guide(params, scale, aesthetic)
  ── Error ('test-hdr-boxplot.R:9:3'): hdr box plot draws correctly ──────────────
  Error in `if (guide$reverse) {
      key <- key[nrow(key):1, ]
  }`: argument is of length zero
  Backtrace:
       ▆
    1. └─vdiffr::expect_doppelganger("hdr boxplot", hdr_boxplot) at test-hdr-boxplot.R:9:3
    2.   └─vdiffr (local) writer(fig, testcase, title)
    3.     ├─vdiffr:::print_plot(plot, title)
    4.     └─vdiffr:::print_plot.ggplot(plot, title)
    5.       ├─base::print(p)
    6.       └─ggplot2:::print.ggplot(p)
    7.         ├─ggplot2::ggplot_build(x)
    8.         └─ggplot2:::ggplot_build.ggplot(x)
    9.           └─plot$guides$build(npscales, plot$layers, plot$labels, data)
   10.             └─ggplot2 (local) build(..., self = self)
   11.               └─guides$train(scales, labels)
   12.                 └─ggplot2 (local) train(..., self = self)
   13.                   └─base::Map(...)
   14.                     └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   15.                       └─ggplot2 (local) `<fn>`(...)
   16.                         └─guide$train(param, scale, aes, title = labels[[aes]])
   17.                           └─ggplot2 (local) train(..., self = self)
   18.                             ├─ggplot2::guide_train(params, scale, aesthetic)
   19.                             └─gghdr:::guide_train.prob_guide(params, scale, aesthetic)
  
  [ FAIL 3 | WARN 6 | SKIP 1 | PASS 8 ]
  Error: Test failures
  Execution halted