Skip to content

crosstable v0.4.0

Compare
Choose a tag to compare
@DanChaltiel DanChaltiel released this 14 Feb 20:16
· 422 commits to main since this release

New features

  • You can now use basic markdown formats in body_add_normal(): **bold**, *italic*, _underlined_, and `code`.
  • New keep_id argument in compact.crosstable(), which enables as_flextable(compact=TRUE, keep_id=TRUE)
  • You can use as_flextable(header_show_n_pattern) to change the glue pattern of these group sizes. The default is {.col} (N={.n}); you can use {.col_key} and {.col_val} when by has multiple strata.
  • Functions body_add_table_legend() and body_add_figure_legend() earn an argument legend_prefix. Useful when set through global options, for instance to make every table/figure start with the name of the study.
  • crosstable_options() can handle new options for all those new features.

Improvements

  • You can now set normal style directly in body_add_normal() (it was only doable through options before).
  • Removed the "variable" header in compacted crosstables.
  • Dataset mtcars2 is now a tibble, with its rownames as a column named "model".
  • as_flextable(by_header=FALSE) now removes the group header (if by has only one stratum).
  • as_flextable(header_show_n) now also works if by has multiple strata.
  • as_flextable(header_show_n=TRUE) adds group size for all groups.

Bug fixes

  • Fixed a bug when numeric variables are treated as categorical (failed if one had a NA value).
  • Fixed a bug that caused body_add_normal() to add an extra empty paragraph if there was a reference in the text.
  • Fixed a bug so that body_add_normal() can be used without argument.
  • Fixed a bug in effect=TRUE when some groups were present in table() but not in glm() due to missing values.