Running ‘testthat.R’ [9s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rtables.officer)
  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
  
  Loading required package: rlistings
  Loading required package: tibble
  Loading required package: rtables
  
  Attaching package: 'rtables'
  
  The following object is masked from 'package:utils':
  
      str
  
  > test_check("rtables.officer", reporter = "check")
  Saving _problems/test-as_flextable-20.R
  Saving _problems/test-as_flextable-84.R
  Saving _problems/test-as_flextable-100.R
  Saving _problems/test-as_flextable-119.R
  Saving _problems/test-as_flextable-139.R
  Saving _problems/test-export_as_docx-3.R
  Saving _problems/test-export_as_docx-44.R
  Saving _problems/test-pagination-38.R
  Saving _problems/test-pagination-91.R
  Saving _problems/test-pagination-121.R
  Saving _problems/test-pagination-153.R
  [ FAIL 11 | WARN 0 | SKIP 0 | PASS 37 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-as_flextable.R:20:3'): Can create flextable object that works with different styles ──
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt, ex_adsl) at test-as_flextable.R:20:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::make_row_df(...)
   10.             └─rtables::make_row_df(...)
   11.               └─rtables (local) .local(...)
   12.                 ├─formatters::make_row_df(...)
   13.                 └─rtables::make_row_df(...)
   14.                   └─rtables (local) .local(...)
   15.                     ├─formatters::pagdfrow(...)
   16.                     │ └─base::data.frame(...)
   17.                     ├─formatters::nlines(...)
   18.                     └─rtables::nlines(...)
   19.                       ├─base::as.vector(get_formatted_cells(x))
   20.                       ├─rtables::get_formatted_cells(x)
   21.                       └─rtables::get_formatted_cells(x)
   22.                         ├─base::matrix(...)
   23.                         ├─base::unlist(...)
   24.                         └─base::Map(...)
   25.                           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   26.                             └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   27.                               └─rtables::format_rcell(...)
   28.                                 └─formatters::format_value(...)
   29.                                   └─base::match.arg(round_type)
  ── Error ('test-as_flextable.R:84:3'): tt_to_flextable does not create different cells when colcounts (or multiple) on different lines ──
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt, ex_adsl) at test-as_flextable.R:84:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::make_row_df(...)
   10.             └─rtables::make_row_df(...)
   11.               └─rtables (local) .local(...)
   12.                 ├─formatters::make_row_df(...)
   13.                 └─rtables::make_row_df(...)
   14.                   └─rtables (local) .local(...)
   15.                     ├─formatters::make_row_df(...)
   16.                     └─rtables::make_row_df(...)
   17.                       └─rtables (local) .local(...)
   18.                         ├─formatters::make_row_df(...)
   19.                         └─rtables::make_row_df(...)
   20.                           └─rtables (local) .local(...)
   21.                             ├─formatters::pagdfrow(...)
   22.                             │ └─base::data.frame(...)
   23.                             ├─formatters::nlines(...)
   24.                             └─rtables::nlines(...)
   25.                               ├─base::as.vector(get_formatted_cells(x))
   26.                               ├─rtables::get_formatted_cells(x)
   27.                               └─rtables::get_formatted_cells(x)
   28.                                 ├─base::matrix(...)
   29.                                 ├─base::unlist(...)
   30.                                 └─base::Map(...)
   31.                                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   32.                                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   33.                                       └─rtables::format_rcell(...)
   34.                                         └─formatters::format_value(...)
   35.                                           └─base::match.arg(round_type)
  ── Error ('test-as_flextable.R:100:3'): check titles bold and html theme ───────
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt, ex_adsl) at test-as_flextable.R:100:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::make_row_df(...)
   10.             └─rtables::make_row_df(...)
   11.               └─rtables (local) .local(...)
   12.                 ├─formatters::make_row_df(...)
   13.                 └─rtables::make_row_df(...)
   14.                   └─rtables (local) .local(...)
   15.                     ├─formatters::make_row_df(...)
   16.                     └─rtables::make_row_df(...)
   17.                       └─rtables (local) .local(...)
   18.                         ├─formatters::make_row_df(...)
   19.                         └─rtables::make_row_df(...)
   20.                           └─rtables (local) .local(...)
   21.                             ├─formatters::pagdfrow(...)
   22.                             │ └─base::data.frame(...)
   23.                             ├─formatters::nlines(...)
   24.                             └─rtables::nlines(...)
   25.                               ├─base::as.vector(get_formatted_cells(x))
   26.                               ├─rtables::get_formatted_cells(x)
   27.                               └─rtables::get_formatted_cells(x)
   28.                                 ├─base::matrix(...)
   29.                                 ├─base::unlist(...)
   30.                                 └─base::Map(...)
   31.                                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   32.                                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   33.                                       └─rtables::format_rcell(...)
   34.                                         └─formatters::format_value(...)
   35.                                           └─base::match.arg(round_type)
  ── Error ('test-as_flextable.R:119:3'): check pagination ───────────────────────
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt, ex_adsl) at test-as_flextable.R:119:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::make_row_df(...)
   10.             └─rtables::make_row_df(...)
   11.               └─rtables (local) .local(...)
   12.                 ├─formatters::make_row_df(...)
   13.                 └─rtables::make_row_df(...)
   14.                   └─rtables (local) .local(...)
   15.                     ├─formatters::make_row_df(...)
   16.                     └─rtables::make_row_df(...)
   17.                       └─rtables (local) .local(...)
   18.                         ├─formatters::make_row_df(...)
   19.                         └─rtables::make_row_df(...)
   20.                           └─rtables (local) .local(...)
   21.                             ├─formatters::pagdfrow(...)
   22.                             │ └─base::data.frame(...)
   23.                             ├─formatters::nlines(...)
   24.                             └─rtables::nlines(...)
   25.                               ├─base::as.vector(get_formatted_cells(x))
   26.                               ├─rtables::get_formatted_cells(x)
   27.                               └─rtables::get_formatted_cells(x)
   28.                                 ├─base::matrix(...)
   29.                                 ├─base::unlist(...)
   30.                                 └─base::Map(...)
   31.                                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   32.                                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   33.                                       └─rtables::format_rcell(...)
   34.                                         └─formatters::format_value(...)
   35.                                           └─base::match.arg(round_type)
  ── Error ('test-as_flextable.R:139:3'): check colwidths in flextable object ────
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt, ex_adsl) at test-as_flextable.R:139:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::make_row_df(...)
   10.             └─rtables::make_row_df(...)
   11.               └─rtables (local) .local(...)
   12.                 ├─formatters::make_row_df(...)
   13.                 └─rtables::make_row_df(...)
   14.                   └─rtables (local) .local(...)
   15.                     ├─formatters::make_row_df(...)
   16.                     └─rtables::make_row_df(...)
   17.                       └─rtables (local) .local(...)
   18.                         ├─formatters::make_row_df(...)
   19.                         └─rtables::make_row_df(...)
   20.                           └─rtables (local) .local(...)
   21.                             ├─formatters::pagdfrow(...)
   22.                             │ └─base::data.frame(...)
   23.                             ├─formatters::nlines(...)
   24.                             └─rtables::nlines(...)
   25.                               ├─base::as.vector(get_formatted_cells(x))
   26.                               ├─rtables::get_formatted_cells(x)
   27.                               └─rtables::get_formatted_cells(x)
   28.                                 ├─base::matrix(...)
   29.                                 ├─base::unlist(...)
   30.                                 └─base::Map(...)
   31.                                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   32.                                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   33.                                       └─rtables::format_rcell(...)
   34.                                         └─formatters::format_value(...)
   35.                                           └─base::match.arg(round_type)
  ── Error ('test-export_as_docx.R:3:3'): export_as_docx works thanks to tt_to_flextable ──
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt, rawdat) at test-export_as_docx.R:3:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::make_row_df(...)
   10.             └─rtables::make_row_df(...)
   11.               └─rtables (local) .local(...)
   12.                 ├─formatters::make_row_df(...)
   13.                 └─rtables::make_row_df(...)
   14.                   └─rtables (local) .local(...)
   15.                     ├─formatters::make_row_df(...)
   16.                     └─rtables::make_row_df(...)
   17.                       └─rtables (local) .local(...)
   18.                         ├─formatters::pagdfrow(...)
   19.                         │ └─base::data.frame(...)
   20.                         ├─formatters::nlines(...)
   21.                         └─rtables::nlines(...)
   22.                           ├─base::as.vector(get_formatted_cells(x))
   23.                           ├─rtables::get_formatted_cells(x)
   24.                           └─rtables::get_formatted_cells(x)
   25.                             ├─base::matrix(...)
   26.                             ├─base::unlist(...)
   27.                             └─base::Map(...)
   28.                               └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   29.                                 └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   30.                                   └─rtables::format_rcell(...)
   31.                                     └─formatters::format_value(...)
   32.                                       └─base::match.arg(round_type)
  ── Error ('test-export_as_docx.R:44:3'): export_as_docx produces a warning if manual column widths are used ──
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt, iris) at test-export_as_docx.R:44:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::make_row_df(...)
   10.             └─rtables::make_row_df(...)
   11.               └─rtables (local) .local(...)
   12.                 ├─formatters::make_row_df(...)
   13.                 └─rtables::make_row_df(...)
   14.                   └─rtables (local) .local(...)
   15.                     ├─formatters::pagdfrow(...)
   16.                     │ └─base::data.frame(...)
   17.                     ├─formatters::nlines(...)
   18.                     └─rtables::nlines(...)
   19.                       ├─base::as.vector(get_formatted_cells(x))
   20.                       ├─rtables::get_formatted_cells(x)
   21.                       └─rtables::get_formatted_cells(x)
   22.                         ├─base::matrix(...)
   23.                         ├─base::unlist(...)
   24.                         └─base::Map(...)
   25.                           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   26.                             └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   27.                               └─rtables::format_rcell(...)
   28.                                 └─formatters::format_value(...)
   29.                                   └─base::match.arg(round_type)
  ── Error ('test-pagination.R:38:3'): export_as_docx handles list generated by tt_to_flextable(paginate=TRUE) ──
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt_paged, test_data_rt) at test-pagination.R:38:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::make_row_df(...)
   10.             └─rtables::make_row_df(...)
   11.               └─rtables (local) .local(...)
   12.                 ├─formatters::make_row_df(...)
   13.                 └─rtables::make_row_df(...)
   14.                   └─rtables (local) .local(...)
   15.                     ├─formatters::pagdfrow(...)
   16.                     │ └─base::data.frame(...)
   17.                     ├─formatters::nlines(...)
   18.                     └─rtables::nlines(...)
   19.                       ├─base::as.vector(get_formatted_cells(x))
   20.                       ├─rtables::get_formatted_cells(x)
   21.                       └─rtables::get_formatted_cells(x)
   22.                         ├─base::matrix(...)
   23.                         ├─base::unlist(...)
   24.                         └─base::Map(...)
   25.                           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   26.                             └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   27.                               └─rtables::format_rcell(...)
   28.                                 └─formatters::format_value(...)
   29.                                   └─base::match.arg(round_type)
  ── Error ('test-pagination.R:91:3'): export_as_docx works with explicit list of rlistings/rtables objects ──
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt_rt, test_data_rt) at test-pagination.R:91:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::pagdfrow(...)
   10.             │ └─base::data.frame(...)
   11.             ├─formatters::nlines(...)
   12.             └─rtables::nlines(...)
   13.               ├─base::as.vector(get_formatted_cells(x))
   14.               ├─rtables::get_formatted_cells(x)
   15.               └─rtables::get_formatted_cells(x)
   16.                 ├─base::matrix(...)
   17.                 ├─base::unlist(...)
   18.                 └─base::Map(...)
   19.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   20.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   21.                       └─rtables::format_rcell(...)
   22.                         └─formatters::format_value(...)
   23.                           └─base::match.arg(round_type)
  ── Error ('test-pagination.R:121:3'): export_as_docx works with pagination via lpp/cpp arguments ──
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt_long, test_data_rt) at test-pagination.R:121:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::make_row_df(...)
   10.             └─rtables::make_row_df(...)
   11.               └─rtables (local) .local(...)
   12.                 ├─formatters::make_row_df(...)
   13.                 └─rtables::make_row_df(...)
   14.                   └─rtables (local) .local(...)
   15.                     ├─formatters::pagdfrow(...)
   16.                     │ └─base::data.frame(...)
   17.                     ├─formatters::nlines(...)
   18.                     └─rtables::nlines(...)
   19.                       ├─base::as.vector(get_formatted_cells(x))
   20.                       ├─rtables::get_formatted_cells(x)
   21.                       └─rtables::get_formatted_cells(x)
   22.                         ├─base::matrix(...)
   23.                         ├─base::unlist(...)
   24.                         └─base::Map(...)
   25.                           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   26.                             └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   27.                               └─rtables::format_rcell(...)
   28.                                 └─formatters::format_value(...)
   29.                                   └─base::match.arg(round_type)
  ── Error ('test-pagination.R:153:3'): export_as_docx works with column widths and autofit settings ──
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(lyt_rt, test_data_rt) at test-pagination.R:153:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::pagdfrow(...)
   10.             │ └─base::data.frame(...)
   11.             ├─formatters::nlines(...)
   12.             └─rtables::nlines(...)
   13.               ├─base::as.vector(get_formatted_cells(x))
   14.               ├─rtables::get_formatted_cells(x)
   15.               └─rtables::get_formatted_cells(x)
   16.                 ├─base::matrix(...)
   17.                 ├─base::unlist(...)
   18.                 └─base::Map(...)
   19.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   20.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   21.                       └─rtables::format_rcell(...)
   22.                         └─formatters::format_value(...)
   23.                           └─base::match.arg(round_type)
  
  [ FAIL 11 | WARN 0 | SKIP 0 | PASS 37 ]
  Error:
  ! Test failures.
  Execution halted