Running ‘testthat.R’ [138s/133s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(phenofit)
  > 
  > test_check("phenofit")
  List of 5
   $ AG    :Classes 'tbl_df', 'tbl' and 'data.frame':	18 obs. of  8 variables:
   $ Beck  :Classes 'tbl_df', 'tbl' and 'data.frame':	18 obs. of  7 variables:
   $ Elmore:Classes 'tbl_df', 'tbl' and 'data.frame':	18 obs. of  8 variables:
   $ Gu    :Classes 'tbl_df', 'tbl' and 'data.frame':	18 obs. of  10 variables:
   $ Zhang :Classes 'tbl_df', 'tbl' and 'data.frame':	18 obs. of  8 variables:
  NULL
  # A tibble: 18 x 8
     flag      t0    mn    mx     rsp    a3     rau    a5
     <fct>  <dbl> <dbl> <dbl>   <dbl> <dbl>   <dbl> <dbl>
   1 2000_1  145. 0.305 0.638 0.0498   6    0.00589  4.42
   2 2001_1  546. 0.283 0.649 0.0152   2    0.00769  2   
   3 2002_1  882. 0.284 0.624 0.0208   2    0.00673  2.42
   4 2003_1 1235. 0.305 0.580 0.0246   2    0.00634  4.03
   5 2004_1 1721. 0.206 0.569 0.00419  2.35 0.0166   2.08
   6 2005_1 2039. 0.209 0.604 0.00740  2.10 0.00805  2   
   7 2006_1 2427. 0.269 0.604 0.00556  4.69 0.0150   2   
   8 2007_1 2680. 0.223 0.577 0.0442   6    0.00466  4.67
   9 2008_1 3149. 0.256 0.568 0.00817  4.63 0.0113   2   
  10 2009_1 3524. 0.306 0.625 0.00714  5.50 0.0153   3.72
  11 2010_1 3870. 0.246 0.633 0.00733  2    0.00814  2   
  12 2011_1 4168. 0.248 0.622 0.0195   2.95 0.00605  2.52
  13 2012_1 4633. 0.298 0.635 0.00660  6    0.0139   2   
  14 2013_1 4879. 0.366 0.593 0.0472   6    0.00552  5.51
  15 2014_1 5350. 0.376 0.596 0.00726  2    0.0164   2   
  16 2015_1 5727. 0.244 0.604 0.00302  2    0.00979  2   
  17 2016_1 5964. 0.336 0.569 0.0488   2.10 0.00533  5.16
  18 2017_1 6382. 0.159 0.550 0.00498  2    0.00559  3.98
  ── 1. Error: (unknown) (@test-PhenoExtract.R#35)  ──────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_silent({
         suppressWarnings({
             stat <- get_GOF(fit)
             d_fit <- get_fitting(fit)
             g <- plot_phenofit(d_fit, brks2)
             grid::grid.newpage()
             grid::grid.draw(g)
         })
     }) at testthat/test-PhenoExtract.R:35
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: suppressWarnings({
         stat <- get_GOF(fit)
         d_fit <- get_fitting(fit)
         g <- plot_phenofit(d_fit, brks2)
         grid::grid.newpage()
         grid::grid.draw(g)
     }) at testthat/test-PhenoExtract.R:36
  10: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  ...
  15: ggplot_gtable(ggplot_build(x))
  16: ggplot_gtable.ggplot_built(ggplot_build(x))
  17: layout$render(geom_grobs, data, theme, plot$labels)
  18: f(..., self = self)
  19: self$facet$draw_panels(panels, self$layout, self$panel_scales_x, self$panel_scales_y, 
         self$panel_params, self$coord, data, theme, self$facet_params)
  20: f(...)
  21: render_strips(col_vars, row_vars, params$labeller, theme)
  22: build_strip(y, labeller, theme, FALSE)
  23: ggstrip(grobs_right, theme, element, gp, horizontal, clip = "on")
  24: Summary.unit(structure(c(5.6, 5.6), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
      meth         RMSE       NSE         R        pvalue  n
  1     AG 9.940385e-03 0.9985845 0.9993452  4.489947e-65 46
  2   Beck 6.088876e-13 1.0000000 1.0000000  0.000000e+00 46
  3 Elmore 2.947222e-10 1.0000000 1.0000000  0.000000e+00 46
  4     Gu 4.039246e-12 1.0000000 1.0000000  0.000000e+00 46
  5   Klos           NA        NA        NA            NA  0
  6  Zhang 5.529035e-06 1.0000000 1.0000000 8.053263e-208 46
  ucminf failed for this problem
  nlminb function evaluation failure
  optim function evaluation failure
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 38 SKIPPED: 0 FAILED: 1
  1. Error: (unknown) (@test-PhenoExtract.R#35) 
  
  Error: testthat unit tests failed
  Execution halted