flextable v0.5.1
Monthly downloads
Functions for Tabular Reporting
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.
Readme
flextable R package
The flextable package provides a framework for easily create tables for reporting. Tables can be embedded within:
- R Markdown documents with support for HTML, Word and PowerPoint documents.
- Microsoft Word or PowerPoint documents.
Getting Started
An API is available to let R users create tables for reporting and
control their formatting properties and their layout. A flextable
object is a data.frame representation, it can be manipulated with
functions that give control over:
- header, body and footer content
- text, paragraphs, cells and border formatting of any element
- displayed values
There are articles on the flextable website that will help you get you to start quickly:
The help pages can be read here.
Installation
install.packages("flextable")
You can get the development version from GitHub:
devtools::install_github("davidgohel/flextable")
Ressources
Online documentation
The help pages are located at https://davidgohel.github.io/flextable/.
Getting help
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
flextable
and r
Stackoverflow
link! I
usually read them and answer when possible.
Contributing to the package
Code of Conduct
Anyone getting involved in this package agrees to our Code of Conduct.
Bug reports
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.
Contributing to the package development
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:
- the new function(s) with code and roxygen tags (with examples)
- a new section in the appropriate vignette that describes how to use the new function
- corresponding tests in directory
tests/testthat
.
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.
Functions in flextable
Name | Description | |
border_outer | set outer borders | |
as_paragraph | concatenate chunks in a flextable | |
delete_part | delete flextable part | |
autofit | Adjusts cell widths and heights | |
colformat_int | format integer columns | |
height | Set flextable rows height | |
hline_bottom | set bottom horizontal border | |
colformat_lgl | format logical columns | |
merge_v | Merge flextable cells vertically | |
style | Set flextable style | |
minibar | mini barplots chunk wrapper | |
theme_alafoli | Apply box theme | |
theme_vader | Apply Sith Lord Darth Vader | |
hline_top | set top horizontal border | |
theme_vanilla | Apply vanilla theme | |
add_header_footer | Add a row of labels in header or footer part | |
hyperlink_text | chunk of text with hyperlink wrapper | |
align | Set text alignment | |
colformat_num | format numeric columns | |
color | Set font color | |
fontsize | Set font size | |
as_grouped_data | grouped data transformation | |
as_image | image chunk wrapper | |
bold | Set bold font | |
set_header_footer_df | Set flextable's header or footer rows | |
as_chunk | chunk of text wrapper | |
footers_flextable_at_bkm | add flextable at a bookmark location in document's footer | |
italic | Set italic font | |
border | Set cell borders | |
set_header_labels | Set flextable's headers labels | |
as_flextable | method to convert object to flextable | |
hline | set horizontal borders | |
display | Define flextable displayed values | |
colformat_char | format character columns | |
empty_blanks | make blank columns as transparent | |
void | Delete flextable content | |
flextable | flextable creation | |
font | Set font | |
padding | Set paragraph paddings | |
dim.flextable | Get flextable dimensions | |
ph_with_flextable | add flextable into a PowerPoint slide | |
width | Set flextable columns width | |
htmltools_value | Render flextable in rmarkdown (including Word and PowerPoint output) | |
theme_booktabs | Apply booktabs theme | |
theme_box | Apply box theme | |
dim_pretty | Calculate pretty dimensions | |
format.flextable | Encode flextable in a document format. | |
bg | Set background color | |
headers_flextable_at_bkm | add flextable at a bookmark location in document's header | |
merge_h_range | rowwise merge of a range of columns | |
vline_left | set flextable left vertical borders | |
merge_none | Delete flextable merging informations | |
vline_right | set flextable right vertical borders | |
xtable_to_flextable | get a flextable from a xtable object | |
print.flextable | flextable printing | |
rotate | rotate cell text | |
theme_tron | Apply tron theme | |
set_caption | set caption | |
theme_tron_legacy | Apply tron legacy theme | |
set_formatter | set column formatter functions | |
body_add_flextable | add flextable into a Word document | |
border_inner_h | set inner borders | |
border_inner_v | set vertical inner borders | |
fix_border_issues | fix border issues when cell are merged | |
flextable-package | flextable: Functions for Tabular Reporting | |
merge_at | Merge flextable cells into a single one | |
merge_h | Merge flextable cells horizontally | |
theme_zebra | Apply zebra theme | |
vline | set vertical borders | |
border_remove | remove borders | |
compose | Define flextable displayed values | |
No Results! |
Vignettes of flextable
Name | ||
format.Rmd | ||
layout.Rmd | ||
overview.Rmd | ||
No Results! |
Last month downloads
Details
Type | Package |
License | GPL-3 |
LazyData | TRUE |
RoxygenNote | 6.1.1 |
Encoding | UTF-8 |
URL | https://davidgohel.github.io/flextable |
BugReports | https://github.com/davidgohel/flextable/issues |
VignetteBuilder | knitr |
NeedsCompilation | no |
Packaged | 2019-02-07 14:32:06 UTC; davidgohel |
Repository | CRAN |
Date/Publication | 2019-02-07 23:13:44 UTC |
imports | data.table , gdtools (>= 0.1.6) , grDevices , htmltools , knitr , magick , officer (>= 0.2.0) , rlang , rmarkdown , stats , utils , xml2 |
suggests | magrittr , testthat , xtable |
Contributors | Maxim Nazarov |
Include our badge in your README
[](http://www.rdocumentation.org/packages/flextable)