Skip to content
CRAN requires the check problems on this package to be fixed before Oct 22 or it will be archived. See the check details

flextable

0.10.3

Functions for Tabular Reporting

101packages dependsuggested by 75
1.2Mdownloads / year
85.3%test coverage
10/13flavors OK

Overview

About

Use a grammar for creating and customizing pretty tables. The following formats are supported: 'HTML', 'PDF', 'Typst', 'RTF', 'Microsoft Word', 'Microsoft PowerPoint', R 'Grid Graphics' and 'patchwork'. '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.

Changes in 0.10.3

issues

  • fix tests for caption: newer pandoc versions add bookmarks to paragraphs next

to tables that are not table captions, which made the bookmark counts fail

on CRAN.

From NEWS.md in the release

Install

Health

CRAN checks
3ERROR10OK
Check messages
ERRORexamplesr-patched-linux-x86_64, r-release-linux-x86_64, r-release-windows-x86_64

r-patched-linux-x86_64, r-release-linux-x86_64

Running examples in ‘flextable-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: as_flextable.TableTree
> ### Title: Transform an rtables object into a flextable
> ### Aliases: as_flextable.TableTree as_flextable.ElementaryTable
> 
> ### ** Examples
> 
> if (require("rtables", character.only = TRUE, quietly = TRUE)) {
+   library(rtables)
+ 
+   lyt <- basic_table(title = "Demographic Summary") %>%
+     split_cols_by("ARM") %>%
+     split_rows_by("SEX") %>%
+     analyze("AGE", afun = mean, format = "xx.x")
+ 
+   tbl <- build_table(lyt, DM)
+   as_flextable(tbl)
+ }

Attaching package: ‘formatters’

The following object is masked from ‘package:base’:

    %||%


Attaching package: ‘rtables’

The following object is masked from ‘package:utils’:

    str

Error in basic_table(title = "Demographic Summary") %>% split_cols_by("ARM") %>%  : 
  could not find function "%>%"
Execution halted

r-release-windows-x86_64

Running examples in 'flextable-Ex.R' failed
The error most likely occurred in:

> ### Name: as_flextable.TableTree
> ### Title: Transform an rtables object into a flextable
> ### Aliases: as_flextable.TableTree as_flextable.ElementaryTable
> 
> ### ** Examples
> 
> if (require("rtables", character.only = TRUE, quietly = TRUE)) {
+   library(rtables)
+ 
+   lyt <- basic_table(title = "Demographic Summary") %>%
+     split_cols_by("ARM") %>%
+     split_rows_by("SEX") %>%
+     analyze("AGE", afun = mean, format = "xx.x")
+ 
+   tbl <- build_table(lyt, DM)
+   as_flextable(tbl)
+ }

Attaching package: 'formatters'

The following object is masked from 'package:base':

    %||%


Attaching package: 'rtables'

The following object is masked from 'package:utils':

    str

Error in basic_table(title = "Demographic Summary") %>% split_cols_by("ARM") %>%  : 
  could not find function "%>%"
Execution halted
ERRORtestsr-patched-linux-x86_64, r-release-linux-x86_64

r-patched-linux-x86_64

Running ‘testthat.R’ [185s/283s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > test_check("flextable")
  Loading required package: flextable
  
  Attaching package: 'xtable'
  
  The following object is masked from 'package:flextable':
  
      align
  
  This is mgcv 1.9-4. For overview type '?mgcv'.
  Gu & Wahba 4 term additive model
  [WARNING] Deprecated: --mathjax. Use --math-method=mathjax[:URL] instead.
  [WARNING] Deprecated: --mathjax. Use --math-method=mathjax[:URL] instead.
  Saving _problems/test-captions-rmd-128.R
  [WARNING] Deprecated: --mathjax. Use --math-method=mathjax[:URL] instead.
  Saving _problems/test-captions-rmd-170.R
  Loading required package: pdftools
  Using poppler version 26.07.0
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  [WARNING] Deprecated: --mathjax. Use --math-method=mathjax[:URL] instead.
  `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
  [ FAIL 2 | WARN 0 | SKIP 1 | PASS 1090 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-quarto.R:1:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-captions-rmd.R:128:3'): with word_document ───────────────────
  Expected `bookmarks` to have length 0.
  Actual length: 2.
  ── Failure ('test-captions-rmd.R:170:3'): with word_document2 ──────────────────
  Expected `bookmarks` to have length 3.
  Actual length: 5.
  
  [ FAIL 2 | WARN 0 | SKIP 1 | PASS 1090 ]
  Error:
  ! Test failures.
  Execution halted

r-release-linux-x86_64

Running ‘testthat.R’ [186s/255s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > test_check("flextable")
  Loading required package: flextable
  
  Attaching package: 'xtable'
  
  The following object is masked from 'package:flextable':
  
      align
  
  This is mgcv 1.9-4. For overview type '?mgcv'.
  Gu & Wahba 4 term additive model
  [WARNING] Deprecated: --mathjax. Use --math-method=mathjax[:URL] instead.
  [WARNING] Deprecated: --mathjax. Use --math-method=mathjax[:URL] instead.
  Saving _problems/test-captions-rmd-128.R
  [WARNING] Deprecated: --mathjax. Use --math-method=mathjax[:URL] instead.
  Saving _problems/test-captions-rmd-170.R
  Loading required package: pdftools
  Using poppler version 26.07.0
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  [WARNING] Deprecated: --mathjax. Use --math-method=mathjax[:URL] instead.
  `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
  [ FAIL 2 | WARN 0 | SKIP 1 | PASS 1090 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-quarto.R:1:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-captions-rmd.R:128:3'): with word_document ───────────────────
  Expected `bookmarks` to have length 0.
  Actual length: 2.
  ── Failure ('test-captions-rmd.R:170:3'): with word_document2 ──────────────────
  Expected `bookmarks` to have length 3.
  Actual length: 5.
  
  [ FAIL 2 | WARN 0 | SKIP 1 | PASS 1090 ]
  Error:
  ! Test failures.
  Execution halted

CRAN check page ↗

Slowest check: 10.6 min · r-oldrel-windows-x86_64
Status changes
  • ERROR10 OK, 3 ERROR2026-10-02
  • OK13 OK2026-09-16
  • NOTE11 OK, 2 NOTE2026-07-16
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
Show 1 earlier changeHide 1 earlier change
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.10.3
READMEYes · 299 wordsVignettesYes · 1 · staticNEWSYes · 100% structured · mentions 0.10.3Citation fileNoWebsiteYes · pkgdown
Help pages
202 (27 internal)includes a package overview page
Examples that run
97%169 run in a plain check (2 of them under a condition) · 6 never run
Exported functions with examples
93%
Documented parameters
92%
Return-value docs
15%
Help pages citing references
0%
Vignettes (1)

Downloads

1.2M
CRAN downloads in the past year
Rank #351 · ~3.4K/day · ~103.3K/mo
Daily download trend is not available in this view yet.
92.9K30 days
271.6K90 days
1.2M1 year
Compare downloads with other packages →
Also on11.6K r2u8 autocran15.5K conda_forge300 c2d4u

Repository

628Stars
91Forks
11Open issues
0Open PRs
1Releases
1,468Commits
32Commit identities
tablems-office-documentshtml5rcrandocxrmarkdownrstats
1,468 commits · Last activity 2026-10-16 · +0.3% stars, 30d · Discussions: 42 posts
Responsiveness
How these are sampled
PRs merged (all time)
73%
Median days to close, 50 most recently updated closed issues
48
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2025-10-11 · 6012026-10-15 · 628
PracticesBeta

10 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/davidgohel/flextable on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (1)
Issue templates
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-08 · The repository has a site deploy workflow

pkgdown site last built 2026-10-08, before release 0.10.3 (2026-10-14)

Coverage (1)
Coverage reporting
Show all practicesHide 2 practices
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
35 external dependencies (excludes base and recommended)

Installing flextable adds 57 packages (36 with compiled code, 53 MB of source tarballs). Heaviest: stringi 11 MB, data.table 5.7 MB, bslib 5.6 MB.

Depends (0)
none
Imports (15)
LinkingTo (0)
none
Enhances (0)
none

People & History

People (15)
Author, Maintainer since 0.1.0 (2017)
Author · added in 0.8.0
Contributor · added in 0.5.10
Contributor · added in 0.7.1
Contributor · added in 0.9.7
Contributor · added in 0.5.2
Contributor · added in 0.6.4
Contributor · added in 0.9.1
Contributor · added in 0.6.2
Contributor · added in 0.4.0
Show 4 more contributorsHide 4 contributors
Contributor · added in 0.9.6
Contributor · added in 0.5.2
Contributor · added in 0.8.0
Contributor · added in 0.5.10
Copyright holder · added in 0.8.4
Releases (58)

Pick two releases to compare their code metrics.

  • 0.10.3Latest
    record
    2026-10-14 · current release · diff ↗ ·
    listed once in CRAN's queue
    Seen in one reading of CRAN's incoming queue, at 2026-10-14 10:55 UTC, so it stayed less than the time between readings.
  • 0.10.1
    record
    2026-09-10 · diff ↗
  • 0.10.0
    record
    2026-07-07 · diff ↗ ·
    added 3 exports
    indentation, repair_docx, save_as_typst
  • 0.9.12
    record
    2026-06-02 · diff ↗ ·
    added 4 exports
    fit_columns, split_columns, split_rows, split_to_pages
  • R
    R 4.6.0 released · 2026-04-24
  • 0.9.11
    record
    2026-02-13 · diff ↗ ·
    added 6 exports
    as_qmd, as_strike, compact_summary, theme_borderless, use_flextable_qmd, wrap_flextable
  • 0.9.10
    record
    2025-08-24 · diff ↗
  • 0.9.9
    record
    2025-05-31 · diff ↗
  • 0.9.8
    record
    2025-05-21 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.9.7
    record
    2024-10-27 · diff ↗
  • 0.9.6
    record
    2024-05-05 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 0.9.5
    record
    2024-03-06 · diff ↗ ·
    added 5 exports
    fmt_signif_after_zeros, information_data_cell, information_data_chunk, information_data_paragraph, tab_settings
  • 0.9.4
    record
    2023-10-23 · diff ↗ ·
    added 2 exports
    delete_columns, delete_rows
  • 0.9.3
    record
    2023-09-07 · diff ↗
Show 53 earlier eventsHide 53 earlier events
  • 0.9.2
    record
    2023-06-18 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 0.9.1
    record
    2023-04-02 · diff ↗ ·
    added 5 exports
    fmt_dbl, fmt_int, fmt_pct, keep_with_next, paginate
  • 0.9.0
    record
    2023-03-14 · diff ↗ ·
    removed 2 exports
    to_html, to_rtf
    added 1 export
    save_as_rtf
  • 0.8.6
    record
    2023-02-23 · diff ↗ ·
    added 2 exports
    to_html, to_rtf
  • 0.8.5
    record
    2023-01-30 · diff ↗
  • 0.8.4
    record
    2023-01-21 · diff ↗
  • 0.8.3
    record
    2022-11-06 · diff ↗ ·
    removed 1 export
    xtable_to_flextable
    added 5 exports
    fmt_avg_dev, fmt_header_n, fmt_n_percent, fmt_summarizor, grid_chunk
  • 0.8.2
    record
    2022-09-27 · diff ↗
  • 0.8.1
    record
    2022-09-19 · diff ↗
  • 0.8.0
    record
    2022-09-11 · diff ↗ ·
    added 3 exports
    gen_grob, labelizor, theme_apa
  • 0.7.3
    record
    2022-08-09 · diff ↗ ·
    added 1 export
    shift_table
  • 0.7.2
    record
    2022-06-12 · diff ↗
  • 0.7.1
    record
    2022-06-02 · diff ↗ ·
    added 6 exports
    add_body_row, as_word_field, prepend_chunks, separate_header, tabulator_colnames, use_model_printer
  • R
    R 4.2.0 released · 2022-04-22
  • 0.7.0
    record
    2022-03-07 · diff ↗ ·
    added 5 exports
    add_latex_dep, append_chunks, fmt_2stats, summarizor, tabulator
  • 0.6.10
    record
    2021-11-15 · diff ↗ ·
    added 2 exports
    df_printer, use_df_printer
  • 0.6.9
    record
    2021-10-07 · diff ↗ ·
    added 1 export
    surround
  • 0.6.8
    record
    2021-09-06 · diff ↗
  • 0.6.7
    record
    2021-07-22 · diff ↗ ·
    added 1 export
    before
  • R
    R 4.1.0 released · 2021-05-18
  • 0.6.6
    record
    2021-05-17 · diff ↗
  • 0.6.5
    record
    2021-04-11 · diff ↗ ·
    added 1 export
    as_equation
  • 0.6.4
    record
    2021-03-10 · diff ↗ ·
    added 5 exports
    as_highlight, chunk_dataframe, colorize, ncol_keys, nrow_part
  • 0.6.3
    record
    2021-02-01 · diff ↗ ·
    added 1 export
    init_flextable_defaults
  • 0.6.2
    record
    2021-01-25 · diff ↗ ·
    added 4 exports
    add_body, colformat_image, fp_border_default, fp_text_default
  • 0.6.1
    record
    2020-12-08 · diff ↗ ·
    removed 4 exports
    display, docx_value, ph_with_flextable, ph_with_flextable_at
  • 0.6.0
    record
    2020-12-01 · diff ↗ ·
    added 9 exports
    colformat_date, colformat_datetime, colformat_double, flextable_to_rmd, get_flextable_defaults, gg_chunk, highlight, plot_chunk, set_flextable_defaults
  • 0.5.11
    record
    2020-09-09 · diff ↗ ·
    added 1 export
    line_spacing
  • 0.5.10
    record
    2020-05-15 · diff ↗ ·
    added 2 exports
    continuous_summary, set_table_properties
  • R
    R 4.0.0 released · 2020-04-24
  • 0.5.9
    record
    2020-03-06 · diff ↗
  • 0.5.8
    record
    2020-02-17 · diff ↗ ·
    added 1 export
    flextable_html_dependency
  • 0.5.7
    record
    2020-02-03 · diff ↗ ·
    added 3 exports
    hrule, save_as_docx, save_as_pptx
  • 0.5.6
    record
    2019-11-12 · diff ↗ ·
    added 1 export
    lollipop
  • 0.5.5
    record
    2019-06-25 · diff ↗ ·
    added 8 exports
    as_b, as_bracket, as_i, as_sub, as_sup, docx_value, fit_to_width, mk_par
  • 0.5.4
    record
    2019-05-14 · diff ↗ ·
    added 5 exports
    as_raster, flextable_dim, footnote, qflextable, save_as_image
  • R
    R 3.6.0 released · 2019-04-26
  • 0.5.2
    record
    2019-04-02 · diff ↗ ·
    added 5 exports
    border_inner, linerange, proc_freq, save_as_html, valign
  • 0.5.1
    record
    2019-02-08 · diff ↗ ·
    added 12 exports
    add_footer_lines, add_footer_row, add_header_lines, add_header_row, align_nottext_col, align_text_col, as_flextable, as_grouped_data, fix_border_issues, merge_h_range, theme_alafoli, theme_vader
  • 0.5.0
    record
    2019-01-31 · diff ↗ ·
    added 5 exports
    as_chunk, as_paragraph, colformat_lgl, compose, set_caption
  • 0.4.6
    record
    2018-10-31 · diff ↗ ·
    added 4 exports
    body_replace_flextable_at_bkm, colformat_char, colformat_int, colformat_num
  • 0.4.5
    record
    2018-08-27 · diff ↗ ·
    added 2 exports
    footers_flextable_at_bkm, headers_flextable_at_bkm
  • R
    R 3.5.0 released · 2018-04-23
  • 0.4.4
    record
    2018-04-20 · diff ↗
  • 0.4.3
    record
    2018-03-14 · diff ↗ ·
    added 13 exports
    border_inner_h, border_inner_v, border_outer, border_remove, font, hline, hline_bottom, hline_top, hyperlink_text, set_footer_df, vline, vline_left, vline_right
  • 0.4.2
    record
    2018-01-10 · diff ↗ ·
    removed 1 export
    tabwid
    added 5 exports
    add_footer, delete_part, height_all, htmltools_value, xtable_to_flextable
  • 0.4.0
    record
    2017-12-08 · diff ↗ ·
    removed 2 exports
    rendertabwid, tabwidOutput
    added 1 export
    set_formatter_type
  • 0.3.0
    record
    2017-09-05 · diff ↗ ·
    added 2 exports
    regulartable, set_formatter
  • 0.2.0
    record
    2017-06-07 · diff ↗ ·
    added 5 exports
    as_image, merge_at, ph_with_flextable_at, rotate, theme_box
  • R
    R 3.4.0 released · 2017-04-21
  • 0.1.0
    record
    2017-03-28
  • R
    R 3.3.0 released · 2016-05-03
Across CRAN, the median accepted release of the past year spent 19 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2017-03-28
Total releases
58 / 9 yrs
License
GPL-3 OSI
Download size
451 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("flextable")
Gohel, D., ArData, Barrowman, M., Browning, S., Daniels, E., Fazilleau, Q., Jager, C., Jobert, S., Julian, P., Nazarov, M., Newman, K., Robert, T., Skintzos, P., Thériault, R., & Yasumoto, A. (2026). flextable: Functions for Tabular Reporting (Version 0.10.3) [Computer software]. https://doi.org/10.32614/CRAN.package.flextable

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for flextable version 0.10.3 [Data set]. HJJB, LLC. Data release v2026-10-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy