Running ‘testthat.R’ [33s/42s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > test_check("flextable")
  Loading required package: flextable
  Saving _problems/test-as_flextable-140.R
  Saving _problems/test-as_flextable-152.R
  Saving _problems/test-as_flextable-343.R
  
  Attaching package: 'xtable'
  
  The following object is masked from 'package:flextable':
  
      align
  
  This is mgcv 1.9-4. For overview type '?mgcv'.
  Gu & Wahba 4 term additive model
  [WARNING] Deprecated: --highlight-style. Use --syntax-highlighting instead.
  [WARNING] Deprecated: --highlight-style. Use --syntax-highlighting instead.
  Loading required package: pdftools
  Using poppler version 25.03.0
  Saving _problems/test-gen_grob-15.R
  Saving _problems/test-gen_grob-16.R
  Saving _problems/test-gen_grob-32.R
  Saving _problems/test-gen_grob-77.R
  Saving _problems/test-gen_grob-117.R
  Saving _problems/test-images-109.R
  Saving _problems/test-latex-5.R
  Saving _problems/test-latex-17.R
  Saving _problems/test-proc-freq-65.R
  Saving _problems/test-proc-freq-70.R
  Saving _problems/test-proc-freq-90.R
  [ FAIL 14 | WARN 0 | SKIP 1 | PASS 364 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • do_manual_msoffice_snapshot_testing is not TRUE (1): 'test-borders.R:3:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-as_flextable.R:140:3'): kmeans works ───────────────────────────
  Error in ``[.data.table`(as.data.table(x), , `:=`(c("cts"), .N), by = c(columns, rows))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─flextable::as_flextable(cl) at test-as_flextable.R:140:3
   2. └─flextable:::as_flextable.kmeans(cl)
   3.   └─flextable::tabulator(...)
   4.     ├─as.data.table(x)[, `:=`(c("cts"), .N), by = c(columns, rows)]
   5.     └─data.table:::`[.data.table`(...)
  ── Error ('test-as_flextable.R:152:3'): partitioning around medoids works ──────
  Error in ``[.data.table`(as.data.table(x), , `:=`(c("cts"), .N), by = c(columns, rows))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─flextable::as_flextable(cl) at test-as_flextable.R:152:3
   2. └─flextable:::as_flextable.pam(cl)
   3.   └─flextable::tabulator(...)
   4.     ├─as.data.table(x)[, `:=`(c("cts"), .N), by = c(columns, rows)]
   5.     └─data.table:::`[.data.table`(...)
  ── Error ('test-as_flextable.R:338:3'): labelled data ──────────────────────────
  Error in ``[.data.table`(as.data.table(x), , `:=`(c("cts"), .N), by = c(columns, rows))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable::proc_freq(...) at test-as_flextable.R:338:3
   2.   └─flextable::tabulator(...)
   3.     ├─as.data.table(x)[, `:=`(c("cts"), .N), by = c(columns, rows)]
   4.     └─data.table:::`[.data.table`(...)
  ── Failure ('test-gen_grob.R:15:3'): png is created ────────────────────────────
  Expected `file.exists(file)` to be TRUE.
  Differences:
  `actual`:   FALSE
  `expected`: TRUE 
  
  ── Failure ('test-gen_grob.R:16:3'): png is created ────────────────────────────
  Expected `file.info(file)$size` > 20000.
  Actual comparison: NA <= 20000.0
  ── Error ('test-gen_grob.R:32:3'): merged borders ──────────────────────────────
  Error in ``[.data.table`(grid_data, , `:=`("cell_width", safe_stat(.SD$col_width, FUN = sum, NA_value = NA_real_)), by = "rowspan_group")`: attempt access index 14/14 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable::gen_grob(ft) at test-gen_grob.R:32:3
   2.   └─flextable:::get_grid_data(x, autowidths, wrapping)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-gen_grob.R:77:3'): text wrapping ───────────────────────────────
  Error in ``[.data.table`(grid_data, , `:=`("cell_width", safe_stat(.SD$col_width, FUN = sum, NA_value = NA_real_)), by = "rowspan_group")`: attempt access index 14/14 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable::gen_grob(ft, fit = "fixed") at test-gen_grob.R:77:3
   2.   └─flextable:::get_grid_data(x, autowidths, wrapping)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-gen_grob.R:117:3'): grid with raster ───────────────────────────
  Error in ``[.data.table`(grid_data, , `:=`("cell_width", safe_stat(.SD$col_width, FUN = sum, NA_value = NA_real_)), by = "rowspan_group")`: attempt access index 14/14 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable::gen_grob(ft) at test-gen_grob.R:117:3
   2.   └─flextable:::get_grid_data(x, autowidths, wrapping)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-images.R:109:3'): multiple images ──────────────────────────────
  Error in ``[.data.table`(grid_data, , `:=`("cell_width", safe_stat(.SD$col_width, FUN = sum, NA_value = NA_real_)), by = "rowspan_group")`: attempt access index 14/14 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable::gen_grob(ft) at test-images.R:109:3
   2.   └─flextable:::get_grid_data(x, autowidths, wrapping)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-latex.R:5:3'): white spaces are protected ──────────────────────
  Error in ``[.data.table`(properties_df, , `:=`(c("vspan_id"), list(rleid(cumsum(.SD$colspan)))), by = c(".part", ".col_id"))`: attempt access index 14/14 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable:::gen_raw_latex(ft) at test-latex.R:5:3
   2.   └─flextable:::latex_gridlines(properties_df)
   3.     └─flextable:::fortify_latex_borders(properties_df)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-latex.R:17:3'): fonts are defined in latex ─────────────────────
  Error in ``[.data.table`(properties_df, , `:=`(c("vspan_id"), list(rleid(cumsum(.SD$colspan)))), by = c(".part", ".col_id"))`: attempt access index 14/14 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable:::gen_raw_latex(ft, quarto = FALSE) at test-latex.R:17:3
   2.   └─flextable:::latex_gridlines(properties_df)
   3.     └─flextable:::fortify_latex_borders(properties_df)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-proc-freq.R:65:3'): proc_freq executes without errors ──────────
  Error in ``[.data.table`(as.data.table(x), , `:=`(c("cts"), .N), by = c(columns, rows))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable::proc_freq(dummy_df, "values", "groups") at test-proc-freq.R:65:3
   2.   └─flextable::tabulator(...)
   3.     ├─as.data.table(x)[, `:=`(c("cts"), .N), by = c(columns, rows)]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-proc-freq.R:70:3'): proc_freq content ──────────────────────────
  Error in ``[.data.table`(as.data.table(x), , `:=`(c("cts"), .N), by = c(columns, rows))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable::proc_freq(dat, row = "o", col = "p") at test-proc-freq.R:70:3
   2.   └─flextable::tabulator(...)
   3.     ├─as.data.table(x)[, `:=`(c("cts"), .N), by = c(columns, rows)]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-proc-freq.R:87:3'): proc_freq content no count ─────────────────
  Error in ``[.data.table`(as.data.table(x), , `:=`(c("cts"), .N), by = c(columns, rows))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─flextable::proc_freq(dat, row = "o", col = "p", include.table_count = FALSE) at test-proc-freq.R:87:3
   2.   └─flextable::tabulator(...)
   3.     ├─as.data.table(x)[, `:=`(c("cts"), .N), by = c(columns, rows)]
   4.     └─data.table:::`[.data.table`(...)
  
  [ FAIL 14 | WARN 0 | SKIP 1 | PASS 364 ]
  Error:
  ! Test failures.
  Execution halted