Running ‘testthat.R’ [75s/233s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > pkg_name <- "tern.mmrm"
  > if (requireNamespace("testthat", quietly = TRUE)) {
  +   library(testthat)
  +   library(vdiffr)
  +   is_on_ci <- isTRUE(as.logical(Sys.getenv("CI")))
  +   if (is_on_ci) {
  +     reporter <- MultiReporter$new(list(
  +       CheckReporter$new()
  +     ))
  +     test_results <- test_check(pkg_name, reporter = reporter)
  +     saveRDS(test_results, "unit_testing_results.rds")
  +   } else {
  +     reporter <- ParallelProgressReporter$new()
  +     test_check(pkg_name, reporter = reporter)
  +   }
  + }
  Loading required package: tern.mmrm
  Loading required package: tern
  Loading required package: rtables
  Loading required package: formatters
  
  Attaching package: 'formatters'
  
  The following object is masked from 'package:base':
  
      %||%
  
  Loading required package: magrittr
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  
  Attaching package: 'rtables'
  
  The following object is masked from 'package:utils':
  
      str
  
  ✔ | F W  S  OK | Context
  
  ⠋ [ FAIL 0 | WARN 0 | SKIP 0 | PASS 0 ] Starting up...                          
  ✔ |         31 | assert_data [5.5s]                                             
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  mmrm() registered as emmeans extension
  
  ✔ |         40 | fit_mmrm [43.5s]                                               
  
  ✔ |          4 | formula                                                        
  
  ✔ |     16   0 | g_mmrm [51.6s]                                                 
  
  ✔ |         10 | labels                                                         
  
  ✔ |      5  44 | lsmeans [10.4s]                                                
  
  ✖ | 2    4   5 | subgroups [27.5s]                                              
  ────────────────────────────────────────────────────────────────────────────────
  Error ('test-subgroups.R:160:3'): tabulate_mmrm_subgroups works as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─basic_table() %>% tabulate_mmrm_subgroups(df) at test-subgroups.R:160:3
    2. └─tern.mmrm::tabulate_mmrm_subgroups(., df)
    3.   └─rtables::build_table(lyt_estimates, df = df$estimates)
    4.     └─rtables::update_ref_indexing(tab)
    5.       ├─formatters::make_row_df(tt)
    6.       └─rtables::make_row_df(tt)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           ├─formatters::make_row_df(...)
   10.           └─rtables::make_row_df(...)
   11.             ├─formatters::make_row_df(...)
   12.             └─rtables::make_row_df(...)
   13.               ├─formatters::make_row_df(...)
   14.               └─rtables::make_row_df(...)
   15.                 ├─formatters::pagdfrow(...)
   16.                 │ └─base::data.frame(...)
   17.                 ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   18.                 └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   19.                   ├─base::unlist(...)
   20.                   └─base::mapply(...)
   21.                     └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   22.                       ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   23.                       └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   24.                         ├─base::unlist(...)
   25.                         └─base::vapply(...)
   26.                           ├─formatters (local) FUN(X[[i]], ...)
   27.                           └─formatters (local) FUN(X[[i]], ...)
   28.                             └─base::vapply(...)
   29.                               └─formatters (local) FUN(X[[i]], ...)
   30.                                 └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   31.                                   └─formatters::open_font_dev(fontspec)
  
  Error ('test-subgroups.R:178:3'): tabulate_mmrm_subgroups with custom settings works as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─basic_table() %>% ... at test-subgroups.R:178:3
    2. └─tern.mmrm::tabulate_mmrm_subgroups(...)
    3.   └─rtables::build_table(lyt_contrasts, df = df$contrasts)
    4.     └─rtables::update_ref_indexing(tab)
    5.       ├─formatters::make_row_df(tt)
    6.       └─rtables::make_row_df(tt)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           ├─formatters::make_row_df(...)
   10.           └─rtables::make_row_df(...)
   11.             ├─formatters::make_row_df(...)
   12.             └─rtables::make_row_df(...)
   13.               ├─formatters::make_row_df(...)
   14.               └─rtables::make_row_df(...)
   15.                 ├─formatters::pagdfrow(...)
   16.                 │ └─base::data.frame(...)
   17.                 ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   18.                 └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   19.                   ├─base::unlist(...)
   20.                   └─base::mapply(...)
   21.                     └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   22.                       ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   23.                       └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   24.                         ├─base::unlist(...)
   25.                         └─base::vapply(...)
   26.                           ├─formatters (local) FUN(X[[i]], ...)
   27.                           └─formatters (local) FUN(X[[i]], ...)
   28.                             └─base::vapply(...)
   29.                               └─formatters (local) FUN(X[[i]], ...)
   30.                                 └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   31.                                   └─formatters::open_font_dev(fontspec)
  ────────────────────────────────────────────────────────────────────────────────
  
  ✖ | 4        0 | table_mmrmt01 [4.3s]                                           
  ────────────────────────────────────────────────────────────────────────────────
  Error ('test-table_mmrmt01.R:22:3'): LS means table is produced correctly
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─... %>% build_table(df, alt_counts_df = mmrm_test_data) at test-table_mmrmt01.R:22:3
    2. └─rtables::build_table(., df, alt_counts_df = mmrm_test_data)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       ├─formatters::make_row_df(...)
    7.       └─rtables::make_row_df(...)
    8.         ├─formatters::make_row_df(...)
    9.         └─rtables::make_row_df(...)
   10.           ├─formatters::make_row_df(...)
   11.           └─rtables::make_row_df(...)
   12.             ├─formatters::pagdfrow(...)
   13.             │ └─base::data.frame(...)
   14.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   15.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   16.               ├─base::unlist(...)
   17.               └─base::mapply(...)
   18.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   19.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   20.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   21.                     ├─base::unlist(...)
   22.                     └─base::vapply(...)
   23.                       ├─formatters (local) FUN(X[[i]], ...)
   24.                       └─formatters (local) FUN(X[[i]], ...)
   25.                         └─base::vapply(...)
   26.                           └─formatters (local) FUN(X[[i]], ...)
   27.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   28.                               └─formatters::open_font_dev(fontspec)
  
  Error ('test-table_mmrmt01.R:46:3'): Fixed effects table is produced correctly
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'toString': argument "fontspec" is missing, with no default
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(result) at test-table_mmrmt01.R:46:3
   2.   └─rlang::cnd_signal(state$error)
  
  Error ('test-table_mmrmt01.R:51:3'): Covariance matrix table is produced correctly
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'toString': argument "fontspec" is missing, with no default
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(result) at test-table_mmrmt01.R:51:3
   2.   └─rlang::cnd_signal(state$error)
  
  Error ('test-table_mmrmt01.R:55:3'): Model diagnostics table is produced correctly
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─tern::as.rtable(mmrm_results, type = "diagnostic", format = "xx.xx") at test-table_mmrmt01.R:55:3
    2. └─tern.mmrm:::as.rtable.tern_mmrm(...)
    3.   └─tern.mmrm::h_mmrm_diagnostic(x, ...)
    4.     └─rtables::build_table(lyt, df)
    5.       └─rtables::update_ref_indexing(tab)
    6.         ├─formatters::make_row_df(tt)
    7.         └─rtables::make_row_df(tt)
    8.           ├─formatters::make_row_df(...)
    9.           └─rtables::make_row_df(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   13.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   14.               ├─base::unlist(...)
   15.               └─base::mapply(...)
   16.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   17.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   18.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   19.                     ├─base::unlist(...)
   20.                     └─base::vapply(...)
   21.                       ├─formatters (local) FUN(X[[i]], ...)
   22.                       └─formatters (local) FUN(X[[i]], ...)
   23.                         └─base::vapply(...)
   24.                           └─formatters (local) FUN(X[[i]], ...)
   25.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   26.                               └─formatters::open_font_dev(fontspec)
  ────────────────────────────────────────────────────────────────────────────────
  
  ✖ | 6       29 | tabulate_mmrm [17.3s]                                          
  ────────────────────────────────────────────────────────────────────────────────
  Error ('test-tabulate_mmrm.R:262:3'): h_mmrm_fixed works as expected
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'toString': argument "fontspec" is missing, with no default
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(result) at test-tabulate_mmrm.R:262:3
   2.   └─rlang::cnd_signal(state$error)
  
  Error ('test-tabulate_mmrm.R:268:3'): h_mmrm_cov works as expected
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'toString': argument "fontspec" is missing, with no default
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(result) at test-tabulate_mmrm.R:268:3
   2.   └─rlang::cnd_signal(state$error)
  
  Error ('test-tabulate_mmrm.R:273:3'): h_mmrm_diagnostic works as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(h_mmrm_diagnostic(mmrm, format = "xx.x")) at test-tabulate_mmrm.R:273:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─tern.mmrm::h_mmrm_diagnostic(mmrm, format = "xx.x")
   10.   └─rtables::build_table(lyt, df)
   11.     └─rtables::update_ref_indexing(tab)
   12.       ├─formatters::make_row_df(tt)
   13.       └─rtables::make_row_df(tt)
   14.         ├─formatters::make_row_df(...)
   15.         └─rtables::make_row_df(...)
   16.           ├─formatters::pagdfrow(...)
   17.           │ └─base::data.frame(...)
   18.           ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   19.           └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   20.             ├─base::unlist(...)
   21.             └─base::mapply(...)
   22.               └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   23.                 ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   24.                 └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   25.                   ├─base::unlist(...)
   26.                   └─base::vapply(...)
   27.                     ├─formatters (local) FUN(X[[i]], ...)
   28.                     └─formatters (local) FUN(X[[i]], ...)
   29.                       └─base::vapply(...)
   30.                         └─formatters (local) FUN(X[[i]], ...)
   31.                           └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   32.                             └─formatters::open_font_dev(fontspec)
  
  Error ('test-tabulate_mmrm.R:360:3'): summarize_lsmeans works as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─... %>% build_table(df) at test-tabulate_mmrm.R:360:3
    2. └─rtables::build_table(., df)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       ├─formatters::make_row_df(...)
    7.       └─rtables::make_row_df(...)
    8.         ├─formatters::make_row_df(...)
    9.         └─rtables::make_row_df(...)
   10.           ├─formatters::make_row_df(...)
   11.           └─rtables::make_row_df(...)
   12.             ├─formatters::pagdfrow(...)
   13.             │ └─base::data.frame(...)
   14.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   15.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   16.               ├─base::unlist(...)
   17.               └─base::mapply(...)
   18.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   19.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   20.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   21.                     ├─base::unlist(...)
   22.                     └─base::vapply(...)
   23.                       ├─formatters (local) FUN(X[[i]], ...)
   24.                       └─formatters (local) FUN(X[[i]], ...)
   25.                         └─base::vapply(...)
   26.                           └─formatters (local) FUN(X[[i]], ...)
   27.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   28.                               └─formatters::open_font_dev(fontspec)
  
  Error ('test-tabulate_mmrm.R:382:3'): summarize_lsmeans works as expected when treatment is not considered in the model
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─... %>% build_table(df) at test-tabulate_mmrm.R:382:3
    2. └─rtables::build_table(., df)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       ├─formatters::make_row_df(...)
    7.       └─rtables::make_row_df(...)
    8.         ├─formatters::make_row_df(...)
    9.         └─rtables::make_row_df(...)
   10.           ├─formatters::make_row_df(...)
   11.           └─rtables::make_row_df(...)
   12.             ├─formatters::pagdfrow(...)
   13.             │ └─base::data.frame(...)
   14.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   15.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   16.               ├─base::unlist(...)
   17.               └─base::mapply(...)
   18.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   19.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   20.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   21.                     ├─base::unlist(...)
   22.                     └─base::vapply(...)
   23.                       ├─formatters (local) FUN(X[[i]], ...)
   24.                       └─formatters (local) FUN(X[[i]], ...)
   25.                         └─base::vapply(...)
   26.                           └─formatters (local) FUN(X[[i]], ...)
   27.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   28.                               └─formatters::open_font_dev(fontspec)
  
  Error ('test-tabulate_mmrm.R:420:3'): summarize_lsmeans works with averages of visits as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─... %>% build_table(df) at test-tabulate_mmrm.R:420:3
    2. └─rtables::build_table(., df)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       ├─formatters::make_row_df(...)
    7.       └─rtables::make_row_df(...)
    8.         ├─formatters::make_row_df(...)
    9.         └─rtables::make_row_df(...)
   10.           ├─formatters::make_row_df(...)
   11.           └─rtables::make_row_df(...)
   12.             ├─formatters::pagdfrow(...)
   13.             │ └─base::data.frame(...)
   14.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   15.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   16.               ├─base::unlist(...)
   17.               └─base::mapply(...)
   18.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   19.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   20.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   21.                     ├─base::unlist(...)
   22.                     └─base::vapply(...)
   23.                       ├─formatters (local) FUN(X[[i]], ...)
   24.                       └─formatters (local) FUN(X[[i]], ...)
   25.                         └─base::vapply(...)
   26.                           └─formatters (local) FUN(X[[i]], ...)
   27.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   28.                               └─formatters::open_font_dev(fontspec)
  ────────────────────────────────────────────────────────────────────────────────
  
  ✔ |          5 | utils                                                          
  
  ✔ |      3  10 | covariance_plot [4.9s]                                         
  
                                                                                  
  ══ Results ═════════════════════════════════════════════════════════════════════
  Duration: 184.3 s
  
  ── Skipped tests (28) ──────────────────────────────────────────────────────────
  • On CRAN (28): 'test-g_mmrm.R:30:3', 'test-g_mmrm.R:37:3',
    'test-g_mmrm.R:44:3', 'test-g_mmrm.R:68:3', 'test-g_mmrm.R:77:3',
    'test-g_mmrm.R:84:3', 'test-g_mmrm.R:91:3', 'test-g_mmrm.R:98:3',
    'test-g_mmrm.R:105:3', 'test-g_mmrm.R:121:3', 'test-g_mmrm.R:128:3',
    'test-g_mmrm.R:139:3', 'test-g_mmrm.R:164:3', 'test-g_mmrm.R:175:3',
    'test-g_mmrm.R:188:3', 'test-g_mmrm.R:201:3', 'test-lsmeans.R:300:3',
    'test-lsmeans.R:311:3', 'test-lsmeans.R:320:3', 'test-lsmeans.R:335:3',
    'test-lsmeans.R:648:3', 'test-subgroups.R:110:3', 'test-subgroups.R:118:3',
    'test-subgroups.R:131:3', 'test-subgroups.R:140:3',
    'test_covariance_plot.R:109:3', 'test_covariance_plot.R:124:3',
    'test_covariance_plot.R:139:3'
  
  ── Failed tests ────────────────────────────────────────────────────────────────
  Error ('test-subgroups.R:160:3'): tabulate_mmrm_subgroups works as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─basic_table() %>% tabulate_mmrm_subgroups(df) at test-subgroups.R:160:3
    2. └─tern.mmrm::tabulate_mmrm_subgroups(., df)
    3.   └─rtables::build_table(lyt_estimates, df = df$estimates)
    4.     └─rtables::update_ref_indexing(tab)
    5.       ├─formatters::make_row_df(tt)
    6.       └─rtables::make_row_df(tt)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           ├─formatters::make_row_df(...)
   10.           └─rtables::make_row_df(...)
   11.             ├─formatters::make_row_df(...)
   12.             └─rtables::make_row_df(...)
   13.               ├─formatters::make_row_df(...)
   14.               └─rtables::make_row_df(...)
   15.                 ├─formatters::pagdfrow(...)
   16.                 │ └─base::data.frame(...)
   17.                 ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   18.                 └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   19.                   ├─base::unlist(...)
   20.                   └─base::mapply(...)
   21.                     └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   22.                       ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   23.                       └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   24.                         ├─base::unlist(...)
   25.                         └─base::vapply(...)
   26.                           ├─formatters (local) FUN(X[[i]], ...)
   27.                           └─formatters (local) FUN(X[[i]], ...)
   28.                             └─base::vapply(...)
   29.                               └─formatters (local) FUN(X[[i]], ...)
   30.                                 └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   31.                                   └─formatters::open_font_dev(fontspec)
  
  Error ('test-subgroups.R:178:3'): tabulate_mmrm_subgroups with custom settings works as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─basic_table() %>% ... at test-subgroups.R:178:3
    2. └─tern.mmrm::tabulate_mmrm_subgroups(...)
    3.   └─rtables::build_table(lyt_contrasts, df = df$contrasts)
    4.     └─rtables::update_ref_indexing(tab)
    5.       ├─formatters::make_row_df(tt)
    6.       └─rtables::make_row_df(tt)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           ├─formatters::make_row_df(...)
   10.           └─rtables::make_row_df(...)
   11.             ├─formatters::make_row_df(...)
   12.             └─rtables::make_row_df(...)
   13.               ├─formatters::make_row_df(...)
   14.               └─rtables::make_row_df(...)
   15.                 ├─formatters::pagdfrow(...)
   16.                 │ └─base::data.frame(...)
   17.                 ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   18.                 └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   19.                   ├─base::unlist(...)
   20.                   └─base::mapply(...)
   21.                     └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   22.                       ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   23.                       └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   24.                         ├─base::unlist(...)
   25.                         └─base::vapply(...)
   26.                           ├─formatters (local) FUN(X[[i]], ...)
   27.                           └─formatters (local) FUN(X[[i]], ...)
   28.                             └─base::vapply(...)
   29.                               └─formatters (local) FUN(X[[i]], ...)
   30.                                 └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   31.                                   └─formatters::open_font_dev(fontspec)
  
  Error ('test-table_mmrmt01.R:22:3'): LS means table is produced correctly
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─... %>% build_table(df, alt_counts_df = mmrm_test_data) at test-table_mmrmt01.R:22:3
    2. └─rtables::build_table(., df, alt_counts_df = mmrm_test_data)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       ├─formatters::make_row_df(...)
    7.       └─rtables::make_row_df(...)
    8.         ├─formatters::make_row_df(...)
    9.         └─rtables::make_row_df(...)
   10.           ├─formatters::make_row_df(...)
   11.           └─rtables::make_row_df(...)
   12.             ├─formatters::pagdfrow(...)
   13.             │ └─base::data.frame(...)
   14.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   15.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   16.               ├─base::unlist(...)
   17.               └─base::mapply(...)
   18.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   19.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   20.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   21.                     ├─base::unlist(...)
   22.                     └─base::vapply(...)
   23.                       ├─formatters (local) FUN(X[[i]], ...)
   24.                       └─formatters (local) FUN(X[[i]], ...)
   25.                         └─base::vapply(...)
   26.                           └─formatters (local) FUN(X[[i]], ...)
   27.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   28.                               └─formatters::open_font_dev(fontspec)
  
  Error ('test-table_mmrmt01.R:46:3'): Fixed effects table is produced correctly
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'toString': argument "fontspec" is missing, with no default
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(result) at test-table_mmrmt01.R:46:3
   2.   └─rlang::cnd_signal(state$error)
  
  Error ('test-table_mmrmt01.R:51:3'): Covariance matrix table is produced correctly
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'toString': argument "fontspec" is missing, with no default
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(result) at test-table_mmrmt01.R:51:3
   2.   └─rlang::cnd_signal(state$error)
  
  Error ('test-table_mmrmt01.R:55:3'): Model diagnostics table is produced correctly
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─tern::as.rtable(mmrm_results, type = "diagnostic", format = "xx.xx") at test-table_mmrmt01.R:55:3
    2. └─tern.mmrm:::as.rtable.tern_mmrm(...)
    3.   └─tern.mmrm::h_mmrm_diagnostic(x, ...)
    4.     └─rtables::build_table(lyt, df)
    5.       └─rtables::update_ref_indexing(tab)
    6.         ├─formatters::make_row_df(tt)
    7.         └─rtables::make_row_df(tt)
    8.           ├─formatters::make_row_df(...)
    9.           └─rtables::make_row_df(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   13.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   14.               ├─base::unlist(...)
   15.               └─base::mapply(...)
   16.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   17.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   18.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   19.                     ├─base::unlist(...)
   20.                     └─base::vapply(...)
   21.                       ├─formatters (local) FUN(X[[i]], ...)
   22.                       └─formatters (local) FUN(X[[i]], ...)
   23.                         └─base::vapply(...)
   24.                           └─formatters (local) FUN(X[[i]], ...)
   25.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   26.                               └─formatters::open_font_dev(fontspec)
  
  Error ('test-tabulate_mmrm.R:262:3'): h_mmrm_fixed works as expected
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'toString': argument "fontspec" is missing, with no default
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(result) at test-tabulate_mmrm.R:262:3
   2.   └─rlang::cnd_signal(state$error)
  
  Error ('test-tabulate_mmrm.R:268:3'): h_mmrm_cov works as expected
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'toString': argument "fontspec" is missing, with no default
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(result) at test-tabulate_mmrm.R:268:3
   2.   └─rlang::cnd_signal(state$error)
  
  Error ('test-tabulate_mmrm.R:273:3'): h_mmrm_diagnostic works as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(h_mmrm_diagnostic(mmrm, format = "xx.x")) at test-tabulate_mmrm.R:273:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─tern.mmrm::h_mmrm_diagnostic(mmrm, format = "xx.x")
   10.   └─rtables::build_table(lyt, df)
   11.     └─rtables::update_ref_indexing(tab)
   12.       ├─formatters::make_row_df(tt)
   13.       └─rtables::make_row_df(tt)
   14.         ├─formatters::make_row_df(...)
   15.         └─rtables::make_row_df(...)
   16.           ├─formatters::pagdfrow(...)
   17.           │ └─base::data.frame(...)
   18.           ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   19.           └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   20.             ├─base::unlist(...)
   21.             └─base::mapply(...)
   22.               └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   23.                 ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   24.                 └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   25.                   ├─base::unlist(...)
   26.                   └─base::vapply(...)
   27.                     ├─formatters (local) FUN(X[[i]], ...)
   28.                     └─formatters (local) FUN(X[[i]], ...)
   29.                       └─base::vapply(...)
   30.                         └─formatters (local) FUN(X[[i]], ...)
   31.                           └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   32.                             └─formatters::open_font_dev(fontspec)
  
  Error ('test-tabulate_mmrm.R:360:3'): summarize_lsmeans works as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─... %>% build_table(df) at test-tabulate_mmrm.R:360:3
    2. └─rtables::build_table(., df)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       ├─formatters::make_row_df(...)
    7.       └─rtables::make_row_df(...)
    8.         ├─formatters::make_row_df(...)
    9.         └─rtables::make_row_df(...)
   10.           ├─formatters::make_row_df(...)
   11.           └─rtables::make_row_df(...)
   12.             ├─formatters::pagdfrow(...)
   13.             │ └─base::data.frame(...)
   14.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   15.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   16.               ├─base::unlist(...)
   17.               └─base::mapply(...)
   18.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   19.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   20.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   21.                     ├─base::unlist(...)
   22.                     └─base::vapply(...)
   23.                       ├─formatters (local) FUN(X[[i]], ...)
   24.                       └─formatters (local) FUN(X[[i]], ...)
   25.                         └─base::vapply(...)
   26.                           └─formatters (local) FUN(X[[i]], ...)
   27.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   28.                               └─formatters::open_font_dev(fontspec)
  
  Error ('test-tabulate_mmrm.R:382:3'): summarize_lsmeans works as expected when treatment is not considered in the model
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─... %>% build_table(df) at test-tabulate_mmrm.R:382:3
    2. └─rtables::build_table(., df)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       ├─formatters::make_row_df(...)
    7.       └─rtables::make_row_df(...)
    8.         ├─formatters::make_row_df(...)
    9.         └─rtables::make_row_df(...)
   10.           ├─formatters::make_row_df(...)
   11.           └─rtables::make_row_df(...)
   12.             ├─formatters::pagdfrow(...)
   13.             │ └─base::data.frame(...)
   14.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   15.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   16.               ├─base::unlist(...)
   17.               └─base::mapply(...)
   18.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   19.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   20.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   21.                     ├─base::unlist(...)
   22.                     └─base::vapply(...)
   23.                       ├─formatters (local) FUN(X[[i]], ...)
   24.                       └─formatters (local) FUN(X[[i]], ...)
   25.                         └─base::vapply(...)
   26.                           └─formatters (local) FUN(X[[i]], ...)
   27.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   28.                               └─formatters::open_font_dev(fontspec)
  
  Error ('test-tabulate_mmrm.R:420:3'): summarize_lsmeans works with averages of visits as expected
  Error in `nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)`: argument "fontspec" is missing, with no default
  Backtrace:
       ▆
    1. ├─... %>% build_table(df) at test-tabulate_mmrm.R:420:3
    2. └─rtables::build_table(., df)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       ├─formatters::make_row_df(...)
    7.       └─rtables::make_row_df(...)
    8.         ├─formatters::make_row_df(...)
    9.         └─rtables::make_row_df(...)
   10.           ├─formatters::make_row_df(...)
   11.           └─rtables::make_row_df(...)
   12.             ├─formatters::pagdfrow(...)
   13.             │ └─base::data.frame(...)
   14.             ├─formatters::nlines(tt, colwidths = colwidths, max_width = max_width)
   15.             └─rtables::nlines(tt, colwidths = colwidths, max_width = max_width)
   16.               ├─base::unlist(...)
   17.               └─base::mapply(...)
   18.                 └─rtables (local) `<fn>`(s = dots[[1L]][[1L]], w = dots[[2L]][[1L]])
   19.                   ├─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   20.                   └─formatters::nlines(strsplit(s, "\n", fixed = TRUE), max_width = w)
   21.                     ├─base::unlist(...)
   22.                     └─base::vapply(...)
   23.                       ├─formatters (local) FUN(X[[i]], ...)
   24.                       └─formatters (local) FUN(X[[i]], ...)
   25.                         └─base::vapply(...)
   26.                           └─formatters (local) FUN(X[[i]], ...)
   27.                             └─formatters::wrap_txt(xi, max_width, fontspec = fontspec)
   28.                               └─formatters::open_font_dev(fontspec)
  
  [ FAIL 12 | WARN 0 | SKIP 28 | PASS 178 ]
  ══ Terminated early ════════════════════════════════════════════════════════════
  Deleting unused snapshots:
  • subgroups/mmrm-forest-plot-with-customizations.svg
  • subgroups/mmrm-forest-plot.svg
  Error: Test failures
  Execution halted