Running ‘testthat.R’ [3s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggrepel)
  Loading required package: ggplot2
  > 
  > test_check("ggrepel")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  ggrepel
   --- call from context --- 
  to_unit(box.padding)
   --- call from argument --- 
  if (class(x) == "unit") {
      return(x)
  }
   --- R stacktrace ---
  where 1: to_unit(box.padding)
  where 2: gTree(limits = limits, data = data, lab = lab, nudges = nudges, 
      box.padding = to_unit(box.padding), point.padding = to_unit(point.padding), 
      segment.colour = segment.colour, segment.size = segment.size, 
      segment.alpha = segment.alpha, min.segment.length = to_unit(min.segment.length), 
      arrow = arrow, force = force, max.iter = max.iter, direction = direction, 
      seed = seed, cl = "textrepeltree")
  where 3: grobName(grob, prefix)
  where 4: ggname("geom_text_repel", gTree(limits = limits, data = data, 
      lab = lab, nudges = nudges, box.padding = to_unit(box.padding), 
      point.padding = to_unit(point.padding), segment.colour = segment.colour, 
      segment.size = segment.size, segment.alpha = segment.alpha, 
      min.segment.length = to_unit(min.segment.length), arrow = arrow, 
      force = force, max.iter = max.iter, direction = direction, 
      seed = seed, cl = "textrepeltree"))
  where 5: f(...)
  where 6: (function (...) 
  f(...))(data, panel_params, coord, parse = FALSE, na.rm = FALSE, 
      box.padding = 0.25, point.padding = 1e-06, segment.colour = NULL, 
      segment.size = 0.5, segment.alpha = NULL, min.segment.length = 0.5, 
      arrow = NULL, force = 1, max.iter = 2000, nudge_x = 0, nudge_y = 0, 
      xlim = c(NA, NA), ylim = c(NA, NA), direction = "both", seed = NA)
  where 7: do.call(self$draw_panel, args)
  where 8: .fun(piece, ...)
  where 9: (function (i) 
  {
      piece <- pieces[[i]]
      if (.inform) {
          res <- try(.fun(piece, ...))
          if (inherits(res, "try-error")) {
              piece <- paste(utils::capture.output(print(piece)), 
                  collapse = "\n")
              stop("with piece ", i, ": \n", piece, call. = FALSE)
          }
      }
      else {
          res <- .fun(piece, ...)
      }
      progress$step()
      res
  })(1L)
  where 10: loop_apply(n, do.ply)
  where 11: llply(.data = pieces, .fun = .fun, ..., .progress = .progress, 
      .inform = .inform, .parallel = .parallel, .paropts = .paropts)
  where 12: plyr::dlply(data, "PANEL", function(data) {
      if (empty(data)) 
          return(zeroGrob())
      panel_params <- layout$panel_params[[data$PANEL[1]]]
      do.call(self$draw_panel, args)
  }, .drop = FALSE)
  where 13: f(..., self = self)
  where 14: self$geom$draw_layer(data, self$geom_params, layout, layout$coord)
  where 15: f(..., self = self)
  where 16: l$draw_geom(d, layout)
  where 17: (function (l, d) 
  l$draw_geom(d, layout))(dots[[1L]][[1L]], dots[[2L]][[1L]])
  where 18: mapply(FUN = f, ..., SIMPLIFY = FALSE)
  where 19: Map(function(l, d) l$draw_geom(d, layout), plot$layers, data)
  where 20: ggplot_gtable.ggplot_built(data)
  where 21: ggplot_gtable(data)
  where 22: print.ggplot(p1)
  where 23 at testthat/test-seed.R#27: print(p1)
  where 24: eval(code, test_env)
  where 25: eval(code, test_env)
  where 26: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 27: doTryCatch(return(expr), name, parentenv, handler)
  where 28: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 29: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 30: doTryCatch(return(expr), name, parentenv, handler)
  where 31: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 32: tryCatchList(expr, classes, parentenv, handlers)
  where 33: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 34: test_code(desc, code, env = parent.frame())
  where 35 at testthat/test-seed.R#19: test_that("calling geom_text_repel without seed creates different plots", 
      {
          ix <- seq(1, nrow(mtcars), 4)
          dat1 <- mtcars[ix, ]
          dat1$label <- rownames(mtcars)[ix]
          png("testthat_test-seed1.png")
          p1 <- ggplot(dat1) + geom_text_repel(aes(wt, mpg, label = label))
          print(p1)
          grid.force()
          pos1 <- pos_df(grid.get("textrepelgrob", grep = TRUE, 
              global = TRUE))
          dev.off()
          unlink("testthat_test-seed1.png")
          png("testthat_test-seed2.png")
          p2 <- ggplot(dat1) + geom_text_repel(aes(wt, mpg, label = label))
          print(p2)
          grid.force()
          pos2 <- pos_df(grid.get("textrepelgrob", grep = TRUE, 
              global = TRUE))
          dev.off()
          unlink("testthat_test-seed2.png")
          expect_true(nrow(pos1) == nrow(dat1))
          expect_true(nrow(pos2) == nrow(dat1))
          expect_true(!identical(pos1, pos2))
      })
  where 36: eval(code, test_env)
  where 37: eval(code, test_env)
  where 38: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 39: doTryCatch(return(expr), name, parentenv, handler)
  where 40: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 41: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 42: doTryCatch(return(expr), name, parentenv, handler)
  where 43: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 44: tryCatchList(expr, classes, parentenv, handlers)
  where 45: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 46: test_code(NULL, exprs, env)
  where 47: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 48: force(code)
  where 49: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          end_context()
      })
  where 50: FUN(X[[i]], ...)
  where 51: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 52: force(code)
  where 53: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 54: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 55: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 56: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 57: test_check("ggrepel")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) == "unit") {
          return(x)
      }
      if (is.na(x)) {
          return(NA)
      }
      unit(x, "lines")
  }
  <bytecode: 0x55e51bbf0430>
  <environment: namespace:ggrepel>
   --- function search by body ---
  Function to_unit in namespace ggrepel has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1