Package: flextable 0.9.8.001

flextable: Functions for Tabular Reporting

Use a grammar for creating and customizing pretty tables. The following formats are supported: 'HTML', 'PDF', 'RTF', 'Microsoft Word', 'Microsoft PowerPoint' and R 'Grid Graphics'. 'R Markdown', 'Quarto' and the package 'officer' can be used to produce the result files. The syntax is the same for the user regardless of the type of output to be produced. A set of functions allows the creation, definition of cell arrangement, addition of headers or footers, formatting and definition of cell content with text and or images. The package also offers a set of high-level functions that allow tabular reporting of statistical models and the creation of complex cross tabulations.

Authors:David Gohel [aut, cre], ArData [cph], Clementine Jager [ctb], Eli Daniels [ctb], Panagiotis Skintzos [aut], Quentin Fazilleau [ctb], Maxim Nazarov [ctb], Titouan Robert [ctb], Michael Barrowman [ctb], Atsushi Yasumoto [ctb], Paul Julian [ctb], Sean Browning [ctb], Rémi Thériault [ctb], Samuel Jobert [ctb], Keith Newman [ctb]

flextable_0.9.8.001.tar.gz
flextable_0.9.8.001.zip(r-4.5)flextable_0.9.8.001.zip(r-4.4)flextable_0.9.8.001.zip(r-4.3)
flextable_0.9.8.001.tgz(r-4.4-any)flextable_0.9.8.001.tgz(r-4.3-any)
flextable_0.9.8.001.tar.gz(r-4.5-noble)flextable_0.9.8.001.tar.gz(r-4.4-noble)
flextable_0.9.8.001.tgz(r-4.4-emscripten)flextable_0.9.8.001.tgz(r-4.3-emscripten)
flextable.pdf |flextable.html
flextable/json (API)
NEWS

# Install 'flextable' in R:
install.packages('flextable', repos = c('https://davidgohel.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/davidgohel/flextable/issues

On CRAN:

docxhtml5ms-office-documentsrmarkdowntable

17.14 score 563 stars 113 packages 6.6k scripts 71k downloads 6 mentions 158 exports 43 dependencies

Last updated 6 hours agofrom:d3c908d874. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 17 2024
R-4.5-winOKNov 17 2024
R-4.5-linuxOKNov 17 2024
R-4.4-winOKNov 17 2024
R-4.4-macOKNov 17 2024
R-4.3-winOKNov 17 2024
R-4.3-macOKNov 17 2024

Exports:add_bodyadd_body_rowadd_footeradd_footer_linesadd_footer_rowadd_headeradd_header_linesadd_header_rowadd_latex_depalignalign_nottext_colalign_text_colappend_chunksas_bas_bracketas_chunkas_equationas_flextableas_grouped_dataas_highlightas_ias_imageas_paragraphas_rasteras_subas_supas_word_fieldautofitbeforebgbody_add_flextablebody_replace_flextable_at_bkmboldborderborder_innerborder_inner_hborder_inner_vborder_outerborder_removechunk_dataframecolformat_charcolformat_datecolformat_datetimecolformat_doublecolformat_imagecolformat_intcolformat_lglcolformat_numcolorcolorizecomposecontinuous_summarydelete_columnsdelete_partdelete_rowsdf_printerdim_prettyempty_blanksfit_to_widthfix_border_issuesflextableflextable_dimflextable_html_dependencyflextable_to_rmdfmt_2statsfmt_avg_devfmt_dblfmt_header_nfmt_intfmt_n_percentfmt_pctfmt_signif_after_zerosfmt_summarizorfontfontsizefooters_flextable_at_bkmfootnotefp_border_defaultfp_text_defaultgen_grobget_flextable_defaultsgg_chunkgrid_chunkheaders_flextable_at_bkmheightheight_allhighlighthlinehline_bottomhline_tophrulehtmltools_valuehyperlink_textinformation_data_cellinformation_data_chunkinformation_data_paragraphinit_flextable_defaultsitalickeep_with_nextlabelizorline_spacinglinerangelollipopmerge_atmerge_hmerge_h_rangemerge_nonemerge_vminibarmk_parncol_keysnrow_partpaddingpaginateplot_chunkprepend_chunksproc_freqqflextableregulartablerotatesave_as_docxsave_as_htmlsave_as_imagesave_as_pptxsave_as_rtfseparate_headerset_captionset_flextable_defaultsset_footer_dfset_formatterset_formatter_typeset_header_dfset_header_labelsset_table_propertiesshift_tablestylesummarizorsurroundtab_settingstabulatortabulator_colnamestheme_alafolitheme_apatheme_booktabstheme_boxtheme_trontheme_tron_legacytheme_vadertheme_vanillatheme_zebrause_df_printeruse_model_printervalignvlinevline_leftvline_rightvoidwidth

Dependencies:askpassbase64encbslibcachemclicpp11data.tabledigestevaluatefastmapfontawesomefontBitstreamVerafontLiberationfontquiverfsgdtoolsgluehighrhtmltoolsjquerylibjsonliteknitrlifecyclememoisemimeofficeropensslR6raggrappdirsRcpprlangrmarkdownsasssyssystemfontstextshapingtinytexuuidxfunxml2yamlzip

Using flextable

Rendered fromoverview.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2021-02-01
Started: 2017-03-24

Readme and manuals

Help Manual

Help pageTopics
flextable: Functions for Tabular Reportingflextable-package
Add column values as new lines in bodyadd_body
Add body labelsadd_body_row
Add column values as new lines in footeradd_footer
Add labels as new rows in the footeradd_footer_lines
Add footer labelsadd_footer_row
Add column values as new lines in headeradd_header
Add labels as new rows in the headeradd_header_lines
Add header labelsadd_header_row
Set text alignmentalign align_nottext_col align_text_col
Append chunks to flextable contentappend_chunks
Bold chunkas_b
Chunk with values in bracketsas_bracket
Chunk of text wrapperas_chunk
Equation chunkas_equation
Method to transform objects into flextablesas_flextable
Transform and summarise a 'data.frame' into a flextable Simple summary of a data.frame as a flextableas_flextable.data.frame
Transform a 'gam' model into a flextableas_flextable.gam
Transform a 'glm' object into a flextableas_flextable.glm
Transform a 'grouped_data' object into a flextableas_flextable.grouped_data
Transform a 'htest' object into a flextableas_flextable.htest
Transform a 'kmeans' object into a flextableas_flextable.kmeans
Transform a 'lm' object into a flextableas_flextable.lm
Transform a mixed model into a flextableas_flextable.brmsfit as_flextable.glmmadmb as_flextable.glmmTMB as_flextable.gls as_flextable.lme as_flextable.merMod as_flextable.nlme
Transform a 'pam' object into a flextableas_flextable.pam
Transform a 'summarizor' object into a flextableas_flextable.summarizor
Transform a 'table' object into a flextableas_flextable.table
Transform a 'tables::tabular' object into a flextableas_flextable.tabular
Transform a 'tabulator' object into a flextableas_flextable.tabulator
Transform a 'xtable' object into a flextableas_flextable.xtable
Add row separators to grouped dataas_grouped_data
Highlight chunkas_highlight
Italic chunkas_i
Image chunk wrapperas_image
Concatenate chunks in a flextableas_paragraph
Subscript chunkas_sub
Superscript chunkas_sup
'Word' computed fieldas_word_field
Adjusts cell widths and heightsautofit
Is an element before a match with entriesbefore
Set background colorbg
Add flextable into a Word documentbody_add_flextable
Add flextable at boorkmark location in a Word documentbody_replace_flextable_at_bkm
Set bold fontbold
Set vertical & horizontal inner bordersborder_inner
Set inner bordersborder_inner_h
Set vertical inner bordersborder_inner_v
Set outer bordersborder_outer
Remove bordersborder_remove
Format character cellscolformat_char
Format date cellscolformat_date
Format datetime cellscolformat_datetime
Format numeric cellscolformat_double
Format cells as imagescolformat_image
Format integer cellscolformat_int
Format logical cellscolformat_lgl
Format numeric cellscolformat_num
Set font colorcolor
Colorize chunkcolorize
Define displayed values and mixed contentcompose mk_par
Continuous columns summarycontinuous_summary
Delete flextable columnsdelete_columns
Delete flextable partdelete_part
Delete flextable rowsdelete_rows
data.frame automatic printing as a flextabledf_printer
Calculate pretty dimensionsdim_pretty
Get widths and heights of flextabledim.flextable
Get optimal width and height of a flextable grobdim.flextableGrob
Make blank columns as transparentempty_blanks
Fit a flextable to a maximum widthfit_to_width
flextable creationflextable qflextable
Get width and height of a flextable objectflextable_dim
Knitr rendering in loops and if statementsflextable_to_rmd
Format content for data generated with summarizor()fmt_2stats fmt_summarizor
Format content for mean and sdfmt_avg_dev
Format numerical datafmt_dbl
Format count data for headersfmt_header_n
Format numerical data as integerfmt_int
Format content for count datafmt_n_percent
Format numerical data as percentagesfmt_pct
Format with significant figures after zerosfmt_signif_after_zeros
Set fontfont
Set font sizefontsize
Add footnotes to flextablefootnote
Border formatting propertiesfp_border_default
Text formatting propertiesfp_text_default
Convert a flextable to a grid grob objectgen_grob
Get flextable defaults formatting propertiesget_flextable_defaults
'ggplots' chunk wrappergg_chunk
'Grid Graphics' chunk wrappergrid_chunk
Set flextable rows heightheight height_all
Text highlight colorhighlight
Set horizontal bordershline
Set bottom horizontal borderhline_bottom
Set top horizontal borderhline_top
Set flextable rule for rows heightshrule
flextable as an 'HTML' objecthtmltools_value
Chunk of text with hyperlinkhyperlink_text
Set italic fontitalic
Set Word 'Keep with next' instructionskeep_with_next
Render flextable with 'knitr'knit_print.flextable
Change displayed labelslabelizor
Set text alignmentline_spacing
Mini linerange chunk wrapperlinerange
Mini lollipop chart chunk wrapperlollipop
Merge flextable cells into a single onemerge_at
Merge flextable cells horizontallymerge_h
Rowwise merge of a range of columnsmerge_h_range
Delete flextable merging informationsmerge_none
Merge flextable cells verticallymerge_v
Mini barplots chunk wrapperminibar
Number of columnsncol_keys
Number of rows of a partnrow_part
Set paragraph paddingspadding
Paginate tablespaginate
Add a flextable into a PowerPoint slideph_with.flextable
Mini plots chunk wrapperplot_chunk
Plot a flextableplot.flextable
plot a flextable grobplot.flextableGrob
Prepend chunks to flextable contentprepend_chunks
flextable printingprint.flextable
Frequency tableproc_freq
Rotate cell textrotate
Add a 'flextable' into an RTF documentrtf_add.flextable
Save flextable objects in a 'Word' filesave_as_docx
Save flextable objects in an 'HTML' filesave_as_html
Save a flextable in a 'png' or 'svg' filesave_as_image
Save flextable objects in a 'PowerPoint' filesave_as_pptx
Save flextable objects in an 'RTF' filesave_as_rtf
Split column names using a separator into multiple rowsseparate_header
Set Captionset_caption
Modify flextable defaults formatting propertiesinit_flextable_defaults set_flextable_defaults
Set column formatter functionsset_formatter set_formatter_type
Set flextable's header or footer rowsset_footer_df set_header_df set_header_footer_df
Change headers labelsset_header_labels
Global table propertiesset_table_properties
Create a shift tableshift_table
Set flextable stylestyle
Data summary preparationsummarizor
Set borders for a selection of cellssurround
Set tabulation marks configurationtab_settings
Tabulation of aggregationssummary.tabulator tabulator
Column keys of tabulator objectstabulator_colnames
Apply alafoli themetheme_alafoli
Apply APA themetheme_apa
Apply booktabs themetheme_booktabs
Apply box themetheme_box
Apply tron themetheme_tron
Apply tron legacy themetheme_tron_legacy
Apply Sith Lord Darth Vader themetheme_vader
Apply vanilla themetheme_vanilla
Apply zebra themetheme_zebra
Get HTML code as a stringto_html.flextable
Set data.frame automatic printing as a flextableuse_df_printer
set model automatic printing as a flextableuse_model_printer
Set vertical alignmentvalign
Set vertical bordersvline
Set flextable left vertical bordersvline_left
Set flextable right vertical bordersvline_right
Delete flextable contentvoid
Set columns widthwidth