Skip to content

Commit

Permalink
Merge pull request #22 from dmurdoch/formatters2
Browse files Browse the repository at this point in the history
Second try for `formatters::matrix_print_form` rename
  • Loading branch information
dmurdoch authored Apr 13, 2024
2 parents 5b3c3fc + b0ea906 commit d59c0b2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 22 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.24
Version: 0.9.25
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
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tables 0.9.24
# tables 0.9.25

- `PlusMinus()` and `Paste()` didn't handle formatting properly
when multiple columns were involved (issue #13).
Expand Down
12 changes: 4 additions & 8 deletions R/tables_mform.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,10 @@ matrix_form.tabular <- function(df) {

# formatters has renamed the matrix_print_form function to
# MatrixPrintForm
MatrixPrintForm <-
if (exists("MatrixPrintForm", envir=asNamespace("formatters")))
formatters::MatrixPrintForm
else if (exists("matrix_print_form", envir=asNamespace("formatters")))
formatters::matrix_print_form
else
stop("formatters::MatrixPrintForm does not exist")

MatrixPrintForm <- try(get("MatrixPrintForm", envir = asNamespace("formatters")), silent = TRUE)
if (inherits(MatrixPrintForm, "try-error"))
MatrixPrintForm <- get("matrix_print_form", envir = asNamespace("formatters"))

MatrixPrintForm(strings = strings,
spans = spans,
aligns = aligns,
Expand Down
19 changes: 7 additions & 12 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# tables 0.9.17
# tables 0.9.25

It didn't fix the issue; some of the example results in \donttest sections
were autoprinting as browsable HTML.
Tried to handle the `formatters::matrix_print_form` differently,
so we never refer to something that isn't there.

# tables 0.9.16
# tables 0.9.24

This version doesn't call browseURL() non-interactively
even in a \donttest section. Hopefully this will deal with the
"calibre" files.
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.15

This is a relatively minor update, adding a few functions. The
reason to send it is that it is used in the R Tables Working Group
project.

0 comments on commit d59c0b2

Please sign in to comment.