Create pretty tables for 'HTML', 'Microsoft Word' and 'Microsoft PowerPoint' documents. Functions are provided to let users create tables, modify and format their content. It extends package 'officer' that does not contain any feature for customized tabular reporting and can be used within R markdown documents.
The flextable package provides a framework for easily create tables for reporting. Tables can be embedded within:
An API is available to let R users create tables for reporting and
control their formatting properties and their layout. A
object is a data.frame representation, it can be manipulated with
functions that give control over:
There are articles on the flextable website that will help you get you to start quickly:
The help pages can be read here.
You can get the development version from GitHub:
The help pages are located at https://davidgohel.github.io/flextable/.
This project is developped and maintained on my own time. If you have
questions about how to use the package, visit Stackoverflow and use tags
usually read them and answer when possible.
Anyone getting involved in this package agrees to our Code of Conduct.
When you file a bug report, please spend some time making it easy for me to follow and reproduce. The more time you spend on making the bug report coherent, the more time I can dedicate to investigate the bug as opposed to the bug report.
A great way to start is to contribute an example or improve the documentation.
If you want to submit a Pull Request to integrate functions of yours, please provide:
By using rhub (run
rhub::check_for_cran()), you will see if everything
is ok. When submitted, the PR will be evaluated automatically on travis
and appveyor and you will be able to see if something broke.
align_nottext_col()to align columns by data type
merge_h_range()to merge a set of columns row by row
fix_border_issues()fix issues with borders when cells are merged
add_footer_lines()to add easily data in header or footer.
as_flextable()to let develop new flextable functions
as_grouped_data()and its method
as_flextable()to create row titles to separate data in a flextable.
composethat will replace
set_captiononly available for html output
knit_print()can be used with rmarkdown when rendering to PowerPoint.
regulartableand logical columns
body_replace_flextable_at_bkmto replace a bookmarked paragraph by a flextable.
colformat_*to make content formatting easier. It also deals with NA.
format.flextablemethod so that users can create their components.
ft.alignto align tables in
ft.splitto activate Word option 'Allow row to break across pages'.
\nis now supported. Function
dim_prettydo not support soft returns and may return wrong results (\n will be considered as "").
hyperlink_text()to be used with
vline*()and many new helper functions to be used instead of borders.
xtable_to_flextable()that is returning a flextable from an xtable object.
htmltools_value()is exported for shiny applications.
knit_print()to render flextable in rmarkdown.
regulartable, faster and simpler than
ph_with_flextable_atto add a flextable at any position in a slide.
merge_atis providing a general way of merging cells.