# flextable ## Docs - [Captions and footnotes](https://mintlify.wiki/davidgohel/flextable/advanced/captions.md): Add table captions with auto-numbering and formatted text, and attach footnote references to cells using footnote(). - [Global defaults](https://mintlify.wiki/davidgohel/flextable/advanced/defaults.md): Set package-wide formatting and behavior defaults that apply to every flextable you create in a session. - [Inline content](https://mintlify.wiki/davidgohel/flextable/advanced/inline-content.md): Build rich cell content from formatted text chunks, hyperlinks, equations, and Quarto markdown using compose(), mk_par(), and as_paragraph(). - [Mini graphics](https://mintlify.wiki/davidgohel/flextable/advanced/mini-graphics.md): Embed inline bar charts, range plots, ggplot2 figures, base R plots, and images directly inside flextable cells. - [Output formats](https://mintlify.wiki/davidgohel/flextable/concepts/output-formats.md): How to render and export a flextable to HTML, Word, PowerPoint, RTF, PDF, image, and R graphics. - [Selectors](https://mintlify.wiki/davidgohel/flextable/concepts/selectors.md): How to use the i, j, and part arguments to target specific rows, columns, and parts of a flextable. - [Table structure](https://mintlify.wiki/davidgohel/flextable/concepts/table-structure.md): How a flextable is organized into header, body, and footer parts, and how to inspect its dimensions. - [Alignment and padding](https://mintlify.wiki/davidgohel/flextable/formatting/alignment-padding.md): Control text alignment, vertical alignment, padding, line spacing, and text rotation in a flextable. - [Borders](https://mintlify.wiki/davidgohel/flextable/formatting/borders.md): Add, remove, and customize borders in a flextable using the full set of border functions. - [Cell formatting](https://mintlify.wiki/davidgohel/flextable/formatting/cell-formatting.md): Control cell background color, vertical alignment, text rotation, padding, line spacing, and combined formatting with style(). - [Text formatting](https://mintlify.wiki/davidgohel/flextable/formatting/text-formatting.md): Apply bold, italic, color, font size, font family, and highlights to text in a flextable. - [Themes](https://mintlify.wiki/davidgohel/flextable/formatting/themes.md): Apply built-in themes to a flextable and set a default theme for all new tables. - [Installation](https://mintlify.wiki/davidgohel/flextable/installation.md): Install flextable from CRAN or GitHub and verify your setup. - [Introduction](https://mintlify.wiki/davidgohel/flextable/introduction.md): Create publication-ready tables for HTML, PDF, Word, PowerPoint, and more with a consistent R grammar. - [Cell content](https://mintlify.wiki/davidgohel/flextable/layout/cell-content.md): Compose rich cell content from text chunks, images, equations, hyperlinks, and inline formatters using compose() and as_paragraph(). - [Column and row sizing](https://mintlify.wiki/davidgohel/flextable/layout/column-row-sizing.md): Set column widths, row heights, and table layout properties in a flextable. - [Headers and footers](https://mintlify.wiki/davidgohel/flextable/layout/headers-footers.md): Add, modify, and remove header and footer rows in a flextable, including multi-level spanning headers. - [Merging cells](https://mintlify.wiki/davidgohel/flextable/layout/merging-cells.md): Merge cells horizontally, vertically, or at specific positions in a flextable. - [HTML output](https://mintlify.wiki/davidgohel/flextable/output/html.md): Save flextable tables as standalone HTML files, use them in Shiny apps, and customize their appearance with CSS. - [Images and graphics](https://mintlify.wiki/davidgohel/flextable/output/images.md): Export flextable tables as PNG or SVG images, convert them to grid grobs, and combine them with ggplot2 plots using patchwork. - [PDF and LaTeX](https://mintlify.wiki/davidgohel/flextable/output/pdf-latex.md): Render flextable tables in PDF documents via knitr, configure LaTeX engines, and control float behavior. - [R Markdown and Quarto](https://mintlify.wiki/davidgohel/flextable/output/rmarkdown-quarto.md): Use flextable in R Markdown and Quarto documents with automatic format detection, captions, and chunk options. - [Word and PowerPoint](https://mintlify.wiki/davidgohel/flextable/output/word-powerpoint.md): Save flextable objects to Word (.docx) and PowerPoint (.pptx) files, or add them to existing officer documents. - [Quickstart](https://mintlify.wiki/davidgohel/flextable/quickstart.md): Create your first flextable and export it to Word or HTML in minutes. - [add_header_row() and add_footer_row()](https://mintlify.wiki/davidgohel/flextable/reference/add-header-footer.md): Add, remove, and split header and footer rows in a flextable. - [align()](https://mintlify.wiki/davidgohel/flextable/reference/align.md): Set horizontal text alignment in a flextable. - [as_flextable()](https://mintlify.wiki/davidgohel/flextable/reference/as-flextable.md): Generic function to convert R objects into flextable objects. - [as_paragraph()](https://mintlify.wiki/davidgohel/flextable/reference/as-paragraph.md): Assemble one or more chunks into a paragraph that defines the content of a flextable cell. - [autofit() and sizing utilities](https://mintlify.wiki/davidgohel/flextable/reference/autofit.md): Automatically size flextable columns and rows, compute dimensions, and constrain table width. - [bg()](https://mintlify.wiki/davidgohel/flextable/reference/bg.md): Set the background color of selected cells in a flextable. - [bold()](https://mintlify.wiki/davidgohel/flextable/reference/bold.md): Set bold font weight on selected rows and columns of a flextable. - [Border functions](https://mintlify.wiki/davidgohel/flextable/reference/border.md): Set, remove, and style borders on flextable cells. - [fix_border_issues() and before()](https://mintlify.wiki/davidgohel/flextable/reference/border-outer-inner.md): Fix border rendering issues and select rows before a target value in flextable. - [colformat_*()](https://mintlify.wiki/davidgohel/flextable/reference/colformat.md): Format columns by type — numeric, integer, character, logical, date, datetime, and image. - [color()](https://mintlify.wiki/davidgohel/flextable/reference/color.md): Set font color on selected rows and columns of a flextable. - [compose() and mk_par()](https://mintlify.wiki/davidgohel/flextable/reference/compose.md): Set cell content from formatted paragraph chunks, mixing text, images, equations, and other inline elements. - [flextable()](https://mintlify.wiki/davidgohel/flextable/reference/flextable.md): Create a flextable object from a data frame. - [font()](https://mintlify.wiki/davidgohel/flextable/reference/font.md): Set the font family on selected rows and columns of a flextable. - [fontsize()](https://mintlify.wiki/davidgohel/flextable/reference/fontsize.md): Set font size on selected rows and columns of a flextable. - [footnote()](https://mintlify.wiki/davidgohel/flextable/reference/footnote.md): Add footnotes to a flextable with reference symbols in cells and associated notes in the footer. - [highlight()](https://mintlify.wiki/davidgohel/flextable/reference/highlight.md): Set text highlight (background) color on selected rows and columns of a flextable. - [Inline chunk elements](https://mintlify.wiki/davidgohel/flextable/reference/inline-elements.md): Build formatted inline content inside as_paragraph() using text, images, equations, hyperlinks, and more. - [italic()](https://mintlify.wiki/davidgohel/flextable/reference/italic.md): Set italic font decoration on selected rows and columns of a flextable. - [Merge functions](https://mintlify.wiki/davidgohel/flextable/reference/merge.md): Merge cells horizontally or vertically in a flextable. - [padding()](https://mintlify.wiki/davidgohel/flextable/reference/padding.md): Set cell padding (inner spacing) on selected rows and columns of a flextable. - [qflextable()](https://mintlify.wiki/davidgohel/flextable/reference/qflextable.md): Quickly create a flextable with fixed layout and autofit column widths. - [rotate()](https://mintlify.wiki/davidgohel/flextable/reference/rotate.md): Rotate cell text direction in a flextable. - [save_as_docx()](https://mintlify.wiki/davidgohel/flextable/reference/save-as-docx.md): Save one or more flextable objects into a Word (.docx) file. - [save_as_html()](https://mintlify.wiki/davidgohel/flextable/reference/save-as-html.md): Save one or more flextable objects into a standalone HTML file. - [save_as_image()](https://mintlify.wiki/davidgohel/flextable/reference/save-as-image.md): Save a flextable as a PNG or SVG image file. - [save_as_pptx()](https://mintlify.wiki/davidgohel/flextable/reference/save-as-pptx.md): Save one or more flextable objects into a PowerPoint (.pptx) file. - [save_as_rtf()](https://mintlify.wiki/davidgohel/flextable/reference/save-as-rtf.md): Save one or more flextable objects into an RTF file. - [set_caption()](https://mintlify.wiki/davidgohel/flextable/reference/set-caption.md): Set a caption for a flextable, with optional auto-numbering, Word style, and HTML formatting. - [set_flextable_defaults()](https://mintlify.wiki/davidgohel/flextable/reference/set-flextable-defaults.md): Get, set, and reset the global default formatting properties applied to every flextable. - [set_header_labels() and set_header_df()](https://mintlify.wiki/davidgohel/flextable/reference/set-header-labels.md): Rename column labels or replace the entire header and footer from a data frame. - [set_table_properties()](https://mintlify.wiki/davidgohel/flextable/reference/set-table-properties.md): Set table-level layout, width, alignment, and output-specific options for a flextable. - [style()](https://mintlify.wiki/davidgohel/flextable/reference/style.md): Apply text, paragraph, and cell formatting properties to a flextable selection in a single call. - [Themes](https://mintlify.wiki/davidgohel/flextable/reference/themes.md): Apply built-in visual themes to a flextable. - [valign()](https://mintlify.wiki/davidgohel/flextable/reference/valign.md): Set the vertical alignment of cell content in a flextable. - [width() and height()](https://mintlify.wiki/davidgohel/flextable/reference/width-height.md): Set column widths and row heights in a flextable. - [Cross-tabulations and frequency tables](https://mintlify.wiki/davidgohel/flextable/summaries/cross-tabulations.md): Build one-way and two-way frequency tables with proc_freq(), convert R table and xtable objects, and present grouped data with as_grouped_data(). - [Statistical models as flextables](https://mintlify.wiki/davidgohel/flextable/summaries/statistical-models.md): Convert lm, glm, mixed models, hypothesis tests, and clustering objects directly to formatted flextables with as_flextable(). - [Descriptive statistics with summarizor](https://mintlify.wiki/davidgohel/flextable/summaries/summarizor.md): Use summarizor() to compute univariate statistics by group and render the result as a formatted flextable. - [Complex cross-tabulations with tabulator](https://mintlify.wiki/davidgohel/flextable/summaries/tabulator.md): Use tabulator() to build pivot-style summary tables that spread aggregated data across both rows and columns with full flextable formatting control.