Running ‘testthat.R’ [72s/87s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggformula)
  Loading required package: ggplot2
  Loading required package: ggstance
  
  Attaching package: 'ggstance'
  
  The following objects are masked from 'package:ggplot2':
  
      GeomErrorbarh, geom_errorbarh
  
  
  New to ggformula?  Try the tutorials: 
  	learnr::run_tutorial("introduction", package = "ggformula")
  	learnr::run_tutorial("refining", package = "ggformula")
  > 
  > test_check("ggformula")
  ── 1. Error: gf_abline() (@test-layer-factory.R#8)  ────────────────────────────
  Please use `data_frame()` or `new_data_frame()` instead of `data.frame()` for better performance. See the vignette "ggplot2 internal programming guidelines" for details.
  1: vdiffr::expect_doppelganger("gf_abline1", gf_point(Sepal.Length ~ Sepal.Width, data = iris) %>% 
         gf_abline(intercept = 3, slope = 1, color = "red")) at testthat/test-layer-factory.R:8
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: gf_point(Sepal.Length ~ Sepal.Width, data = iris) %>% gf_abline(intercept = 3, slope = 1, 
         color = "red")
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: gf_abline(., intercept = 3, slope = 1, color = "red")
  13: do.call(layer_fun, layer_args, envir = environment)
  14: (function (mapping = NULL, data = NULL, ..., slope, intercept, na.rm = FALSE, show.legend = NA) 
     {
         if (missing(mapping) && missing(slope) && missing(intercept)) {
             slope <- 1
             intercept <- 0
         }
         if (!missing(slope) || !missing(intercept)) {
             if (missing(slope)) 
                 slope <- 1
             if (missing(intercept)) 
                 intercept <- 0
             data <- data.frame(intercept = intercept, slope = slope)
             mapping <- aes(intercept = intercept, slope = slope)
             show.legend <- FALSE
         }
         layer(data = data, mapping = mapping, stat = StatIdentity, geom = GeomAbline, 
             position = PositionIdentity, show.legend = show.legend, inherit.aes = FALSE, 
             params = list(na.rm = na.rm, ...))
     })(data = NULL, mapping = structure(list(), .Names = character(0), class = "uneval"), 
         show.legend = NA, slope = 1, intercept = 3, color = "red")
  15: data.frame(intercept = intercept, slope = slope)
  16: stop("Please use `data_frame()` or `new_data_frame()` instead of `data.frame()` for better performance. See the vignette \"ggplot2 internal programming guidelines\" for details.", 
         call. = FALSE)
  
  ── 2. Error: gf_coefline() (@test-layer-factory.R#186)  ────────────────────────
  Please use `data_frame()` or `new_data_frame()` instead of `data.frame()` for better performance. See the vignette "ggplot2 internal programming guidelines" for details.
  1: vdiffr::expect_doppelganger("gf_coefline1", gf_point(Sepal.Length ~ Sepal.Width, 
         data = iris) %>% gf_coefline(coef = coef(mdl))) at testthat/test-layer-factory.R:186
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: gf_point(Sepal.Length ~ Sepal.Width, data = iris) %>% gf_coefline(coef = coef(mdl))
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: gf_coefline(., coef = coef(mdl))
  13: gf_abline(object = object, intercept = coef[1], slope = coef[2], ..., inherit = FALSE)
  14: do.call(layer_fun, layer_args, envir = environment)
  15: (function (mapping = NULL, data = NULL, ..., slope, intercept, na.rm = FALSE, show.legend = NA) 
     {
         if (missing(mapping) && missing(slope) && missing(intercept)) {
             slope <- 1
             intercept <- 0
         }
         if (!missing(slope) || !missing(intercept)) {
             if (missing(slope)) 
                 slope <- 1
             if (missing(intercept)) 
                 intercept <- 0
             data <- data.frame(intercept = intercept, slope = slope)
             mapping <- aes(intercept = intercept, slope = slope)
             show.legend <- FALSE
         }
         layer(data = data, mapping = mapping, stat = StatIdentity, geom = GeomAbline, 
             position = PositionIdentity, show.legend = show.legend, inherit.aes = FALSE, 
             params = list(na.rm = na.rm, ...))
     })(data = NULL, mapping = structure(list(), .Names = character(0), class = "uneval"), 
         show.legend = NA, slope = c(Sepal.Width = -0.2233610611299), intercept = c(`(Intercept)` = 6.52622255089448))
  16: data.frame(intercept = intercept, slope = slope)
  17: stop("Please use `data_frame()` or `new_data_frame()` instead of `data.frame()` for better performance. See the vignette \"ggplot2 internal programming guidelines\" for details.", 
         call. = FALSE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 0 SKIPPED: 87 WARNINGS: 4 FAILED: 2
  1. Error: gf_abline() (@test-layer-factory.R#8) 
  2. Error: gf_coefline() (@test-layer-factory.R#186) 
  
  Error: testthat unit tests failed
  Execution halted