Skip to content

Commit

Permalink
CRAN doesn't like formatters::matrix_print_form even if it is never c…
Browse files Browse the repository at this point in the history
…alled.
  • Loading branch information
dmurdoch committed Apr 13, 2024
1 parent 801e042 commit e952e8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 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")))
if (inherits(MatrixPrintForm, "try-error"))
MatrixPrintForm <- get("matrix_print_form", envir = asNamespace("formatters"))

MatrixPrintForm(strings = strings,
spans = spans,
aligns = aligns,
Expand Down

0 comments on commit e952e8a

Please sign in to comment.