Note that huxtable attempts to follow semantic versioning (https://semver.org). Therefore, major version increments reflect backwards-incompatible API changes, not necessarily big changes.
- More speedups: LaTeX 2-3x faster, as_Workbook 2-3x faster.
- Simplify LaTeX output using our own LaTeX commands.
- Bugfix: LaTeX didn't compile when height and caption were both set.
- Bugfix:
print_screen
andprint_md
would hang with a wide huxtable. - New
border_style
properties to set "solid", "double", "dotted" or "dashed" borders. (At present, LaTeX only allows "solid" or "double".) - New
merge_cells
function provides an alternative interface tocolspan
androwspan
. - New
quick_pptx
function to print data frames and huxtables into Powerpoint. - New
install_latex_dependencies
andcheck_latex_dependencies
utility functions. add_rows
andadd_columns
now accept data frames as arguments.- Tweaks to documentation.
- dplyr, knitr, rmarkdown and some other packages have moved to "Suggests:", lowering the dependency load considerably. All the functionality is still present. huxtable gives an informative warning if a needed package is not installed.
- Code rewrites for better performance and maintainability: HTML is up to 10x faster, LaTeX is up to 4x faster.
- Documentation improvements.
- New
tribble_hux
function wrappingtibble::tribble()
for readable data input. - New
add_rows
andadd_columns
functions to insert one or more rows into the middle of a huxtable. - New option "huxtable.knitr_output_format" to override the default output format in knitr documents.
- Numeric row heights and column widths are rescaled to 1 when huxtables are cbinded/rbinded.
- LaTeX: at points where borders cross, priority is given to the horizontal border color.
- Bugfix: property accessors had the wrong environment. Thanks to Iñaki Úcar.
- Bugfix: row heights and column widths weren't being copied with cbind/rbind.
- Bugfixes for 0-row or 0-column huxtables:
- Output works, usually with a warning.
- cbind and rbind work.
- Bugfix: HTML cols were printed with 'width: NA'.
- Bugfix: width, col_width etc. can be reset to a number after setting them to a string.
- The (undocumented) ability to mix numeric and non-numeric values for padding and/border widths has been removed. If you want a number, set a number and not a string.
- Bugfix: HTML tables with position "right" weren't right-aligned.
- Nicer error messages when rbinding objects with different numbers of rows.
- Vignette improvements.
is_a_number
is deprecated.- ... and a cool new randomized
hux_logo()
;-)
- Improved formatting in Excel output.
- New
format
method which returns the result ofto_html
,to_latex
etc. as appropriate. - Bugfix:
to_html
printing e.g. "left-border: NA;" in cell CSS. - Bugfix:
set_all_*
not working when huxtable is not attached. - Bugfix:
as_Workbook
failing with non-numericwidth
. - Bugfix:
hux_logo
was using multiple fonts, fails with Excel output. - Bugfix:
as_flextable
borders not working in cells with colspan > 1. - Documentation bugfixes.
- Compatibility with broom 5.0.0 - thanks @alexpghayes
- New
theme_plain
theme. - The default value for
add_colnames
is going to becomeTRUE
. At present it remainsFALSE
. Setoptions("huxtable.add_colnames")
toTRUE
orFALSE
to set the default and avoid warnings in future. quick_*
functions now automatically open documents if used interactively. Useopen = FALSE
to avoid.- Tweak top and bottom margins for HTML tables.
pad_decimal
is deprecated in favour ofalign(ht) <- "."
.huxreg
continues with a warning ifstatistics
are unavailable for some models.
- huxtable now provides
knit_print.data.frame
methods. This means that bare data frames will be pretty-printed via huxtable if the package is loaded.- Set
options("huxtable.knit_print_df")
toFALSE
if you don't want this. - By default data frames are printed using the
theme_plain
theme. Set options("huxtable.knit_print_df_theme") to a different one-argument function if you want to use a different theme.
- Set
- The new
autoformat
argument letshuxtable()
andas_huxtable()
automatically choose alignment and number format based on column type. Setoptions("huxtable.autoformat")
toFALSE
to turn off this feature by default. - The default value of
number_format
has changed from "%5.3g" to "%.3g", which no longer space-pads numbers. as_flextable
now does not print column names in the header. This matches the standard huxtable behaviour whereby headers are "just another row/column". To get the old behaviour, usecolnames_to_header = TRUE
.
- Bugfix: Date and datetime columns were converted to numbers by
add_colnames
. - LaTeX bugfix: background colors were printing an extra space.
huxreg
was never using built-in confidence intervals.- Screen bugfixes:
- set max_width to screen width (thanks @jacob-long)
- misaligned decimal points
- Various bugfixes for
number_format
,huxreg
,as_hux.table
,as_flextable
.
- Output to Excel workbooks using the
openxlsx
package. - New
quick_xlsx
function. - dplyr select helpers now work inside
set_*
column specifications: e.g. set_bold(ht, 1:3, matches("ab"), TRUE) - Column names can now be used for the
after
argument toinsert_column
. quick_*
functions: when thefile
argument is not explicitly specified, confirm overwrites manually, or fail if called non-interactively.- Add pointless quote marks in Description and Title... I don't make the rules.
- Don't apply number_format to negative exponents (e.g. 1.12e-3).
- New
tidy_args
argument to huxreg allows per-model customization of the call totidy
.
quick_xxx
functions without an explicitfile
argument throw an error if called non-interactively, and prompt before overwriting files if called interactively.
- Don't apply
number_format
to exponents in scientific notation. - Turn off some tests on CRAN, as they fail there but not elsewhere.
- Fix
quick_pdf
error when moving output across filesystems.
- New
quick_html
,quick_pdf
andquick_docx
functions to print table-like objects to a new document. to_screen
only shows colnames if there are any non-zero-length column names.
number_format
now applies to any number-like substrings in cells. This means you can include e.g. significance stars in a cell and still usenumber_format
to format the content.- If
number_format
is NA, numbers are unchanged. - Default value of
number_format
has changed from "%5.2f" to "%5.3g", which plays nicer with integers but may surprise you by using scientific format for large numbers.
- New
outer_borders
argument forhuxreg
. This changes default behaviour slightly. - New
border
argument foradd_footnote
to choose width of footnote's top border. - Added guard assertions to many exported functions.
- Bugfix: captions and colnames are wrapped in to_screen to respect max_width.
- No more ugly autocreated column names.
- Allow huxtable to have invalid or empty column names in general.
- LaTeX should now be much faster on large tables.
set_outer_borders
now accepts the same row/column arguments as otherset_
functions.- Better handling in LaTeX of horizontal borders which don't cross the entire table. (But not varying positive border widths....)
- Bugfix: flextable didn't like huxreg's syntactically invalid column names.
- Accept, but silently change, English spelling of 'centre' in
align
,position
andcaption_pos
.
- LaTeX implements different thicknesses for vertical and horizontal borders (but only one horizontal thickness per row).
- LaTeX border colors now collapse nicely: set colors override unset ones.
- React gracefully to lack of p values in
huxreg
. - New
set_outer_borders
function to set borders round a rectangle of cells. to_screen
andto_md
now respectwrap
andcol_widths
properties.- Screen and markdown wrap respect word boundaries.
to_screen
andto_md
gain amin_width
argument;to_md
gains a logicalheader
argument;to_screen
gains acompact
argument replacingblank = NULL
.- On screen colour and bold support, if the
crayon
package is installed. Newhuxtable.color_screen
option. - Move from
ReporteRs
toofficer
andflextable
. No moreRJava
horror. - New
error_format
argument tohuxreg
for flexible control over uncertainty estimates. - Infrastructure improvements: slightly less ugly code in screen.R and LaTeX.R.
- Removed options
collapse
,borders
,blank
andcolname_color
fromto_screen
/print_screen
. as_FlexTable
is deprecated and callsas_flextable
with a warning.header_rows
andfooter_rows
arguments are ignored. If you need this feature, tell me.- HTML border sizes are now set in points, not pixels.
- In
huxreg
:ci_level
isNULL
by default. Set it to a number to calculate confidence intervals.error_style
is deprecated with a warning in favour oferror_format
.- Use
{stars}
not%stars%
to display significance levels in thenote
argument. borders
becomes a number specifying border width. Set to 0 for no borders.
- New convenience functions
insert_row
andinsert_column
. latex_float
property allows you to change positioning in LaTeX.- (Semantic versioning fail: this should have been 0.4.0.)
- New borders argument for huxreg, gives borders in sensible places.
- Allow more flexible caption positioning with
caption_pos
. - New
set_default_properties
function to set default properties for new huxtables. - Fix compatibility with dplyr 0.6.0.
- Fix a bug that could lead to wrong significance stars in
huxreg
.
- Compatibility with dplyr 0.6.0.
- Use ~ for decimal padding in LaTeX.
- New
huxreg
function to convert a list of models to a huxtable. - New set_* interface allowing column ranges, expressions a la
subset
, and filling in values by row. - Replacement methods
$<-
,[<-
and[[<-
now work better. - New function
set_cell_properties
to set multiple properties on cells. evens
,odds
,everywhere
,every(n, from)
,final(n)
,where(cond)
: convenience functions to select rows, columns and cells.- Export to Word/Powerpoint via
ReporteRs
. - Huxtable now supports dplyr verbs like
filter
andselect
. - Exported function
guess_knitr_output_format
. - Ability to set border colors.
- Prevent overlapping row/colspans.
- Expanded introduction and new vignette for
huxreg
. - Numerous bugs have been fixed and replaced with new, more advanced bugs.
theme_minimal
has been renamedtheme_basic
to avoid a name clash withggplot2
.
- Added a
NEWS.md
file to track changes to the package. - First CRAN release.