Package check result: OK Changes to worse in reverse depends: Package: rtables Check: tests New result: ERROR Running ‘testthat.R’ [109s/109s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > test_check("rtables", reporter = "check") 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 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 Failed with error: 'there is no package called 'bwrereloakdosirabttjtaeerr'' [ FAIL 2 | WARN 0 | SKIP 0 | PASS 1504 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-pagination.R:450:3'): Pagination works with non-default min_siblings ── `paginate_table(tt, lpp = 3, min_siblings = 1)` threw an error with unexpected message. Expected match: "Unable to find any valid pagination split between rows 1 and 1" Actual message: "-------------------------------------- Error Summary ----------------------------------------\nUnable to find any valid pagination split for page 1 between rows 1 and 1. \nInserted lpp (row-space, lines per page) : 3\nContext-relevant additional header/footers lines: 2\nLimit of allowed row lines per page: 1 \nNote: take a look at the last FAIL(ed) attempt above to see what went wrong. It could be, for example, that the inserted column width induces some wrapping, hence the inserted number of lines (lpp) is not enough." Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-pagination.R:450:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─rtables::paginate_table(tt, lpp = 3, min_siblings = 1) 7. └─formatters::paginate_indices(...) 8. └─formatters::pag_indices_inner(...) 9. └─formatters:::find_pag(...) 10. └─formatters:::find_pag(...) ── Failure ('test-printing.R:326:3'): Decimal alignment works ────────────────── `res` not identical to `expected`. Lengths differ: 18 is not 17 [ FAIL 2 | WARN 0 | SKIP 0 | PASS 1504 ] Error: Test failures Execution halted Package: tables Check: dependencies in R code New result: WARNING Missing or unexported object: ‘formatters::matrix_print_form’ Package: tables Check: examples New result: ERROR Running examples in ‘tables-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: matrix_form.tabular > ### Title: Transform tabular object to matrices printable by formatters > ### package > ### Aliases: matrix_form.tabular > > ### ** Examples > > if (requireNamespace("formatters")) { + Sex <- factor(sample(c("Male", "Female"), 100, rep=TRUE)) + Status <- factor(sample(c("low", "medium", "high"), 100, rep=TRUE)) + z <- rnorm(100) + 5 + fmt <- function(x) { + s <- format(x, digits=2) + even <- ((1:length(s)) %% 2) == 0 + s[even] <- sprintf("(%s)", s[even]) + s + } + tab <- tabular( Justify(c)*Heading()*z*Sex*Heading(Statistic)*Format(fmt())*(mean+sd) + ~ Status ) + mform <- matrix_form.tabular(tab) + page <- 1 + cat("Page ", page, " Full table\n\n") + cat(formatters::toString(mform)) + + # This shows automatic pagination, breaking up the + # table by rows + byrow <- formatters::pag_indices_inner(formatters::mf_rinfo(mform), + rlpp = 2, + min_siblings = 1) + for (i in seq_along(byrow)) { + mform2 <- matrix_form.tabular(tab[byrow[[i]], ]) + page <- page + 1 + cat("\nPage ", page, " Rows", byrow[[i]], "\n\n") + cat(formatters::toString(mform2)) + } + + # This gives the breaks by columns, counting the + # row label columns: + bycol <- formatters::vert_pag_indices(mform, cpp = 30, rep_cols = 2) + # Display the table with both kinds of breaks + for (i in seq_along(byrow)) { + rows <- byrow[[i]] + for (j in seq_along(bycol)) { + cols <- bycol[[j]] + cols <- cols[cols > 2] - 2 # cols includes the row labels + mform3 <- matrix_form.tabular(tab[rows, cols, drop = FALSE]) + page <- page + 1 + cat("\nPage ", page, "Rows", rows, "column", cols, "\n\n") + cat(formatters::toString(mform3)) + } + } + } Loading required namespace: formatters Error: 'matrix_print_form' is not an exported object from 'namespace:formatters' Execution halted