diff --git a/DESCRIPTION b/DESCRIPTION index 1f86b42..d36847e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 diff --git a/NEWS.md b/NEWS.md index 5cd0edd..d87d080 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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). diff --git a/R/tables_mform.R b/R/tables_mform.R index b036a1c..d4e015b 100644 --- a/R/tables_mform.R +++ b/R/tables_mform.R @@ -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, diff --git a/cran-comments.md b/cran-comments.md index 54322e7..ecb84ff 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -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.