openpharma / crmPack

Object-Oriented Implementation of CRM Designs
https://openpharma.github.io/crmPack/
19 stars 9 forks source link

Formatting of some `knitr` tables produced by `knit_print` has changed #806

Open Puzzled-Face opened 4 months ago

Puzzled-Face commented 4 months ago

Perhaps as a side effect of PR #804, the formatting of some knitr tables have changed. The issue appears to affect tables that represent slots whose values are themselves crmPack objects (possibly sub-classes of DataGeneral in particular). The values reported are unchanged and correct: it is just the appearance of the tables that has changed. For example...

Previously: image

Currently: image

The culprit is likely to be: image

Puzzled-Face commented 4 months ago

The solution might be to change format_func from format_func = function(x) x to (eg)

format_func = function(z) {
    kableExtra::kable_styling(
      z,
      bootstrap_options = c("striped", "hover", "condensed")
    )
  }

See knit_print for NextBestNCRMLoss in helpers_knitr_NextBest.R (lines 480-485 at the time of writing).