Skip to content

Commit

Permalink
Merge pull request #25 from dmurdoch/formatters
Browse files Browse the repository at this point in the history
Work around change to formatters package.
  • Loading branch information
dmurdoch authored Jun 25, 2024
2 parents 997ff12 + 18cbbce commit 19459bb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tables
Title: Formula-Driven Table Generation
Version: 0.9.26
Version: 0.9.27
Author: Duncan Murdoch
Description: Computes and displays complex tables of summary statistics.
Output may be in LaTeX, HTML, plain text, or an R
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# tables 0.9.26
# tables 0.9.27

- A factor level of `""` caused an error when displayed. It will
now be changed to `" "` for display (issue #19).
- The `VignetteBuilder` field in `DESCRIPTION` has been changed to
`rmarkdown` so that Pandoc can be found even when it is not on the `PATH`.
- Another minor update due to changes to the `formatters` package.

# tables 0.9.25

Expand Down
14 changes: 4 additions & 10 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# tables 0.9.25

Tried to handle the `formatters::matrix_print_form` differently,
so we never refer to something that isn't there.

# tables 0.9.24

This is a minor release, fixing a few bugs and adding a function
at the request of the `tinytables` package. The submission was
triggered by a change to the exports of the `formatters` package.
# tables 0.9.27

This is a small bug fix release. It also contains a fix for the
error reported by CRAN on June 21 to work with an update to the
formatters package.
10 changes: 8 additions & 2 deletions man/matrix_form.tabular.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ if (requireNamespace("formatters")) {
}
# This gives the breaks by columns, counting the
# row label columns:
bycol <- formatters::vert_pag_indices(mform, cpp = 30, rep_cols = 2)
# row label columns.
# The formatters::vert_pag_indices function had an incompatible
# change in v0.5.8
if ("fontspec" \%in\% names(formals(formatters::vert_pag_indices)))
bycol <- formatters::vert_pag_indices(mform, cpp = 30, rep_cols = 2,
fontspec = NULL)
else
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]]
Expand Down

0 comments on commit 19459bb

Please sign in to comment.