Learn R Programming

⚠️There's a newer version (0.9.5) of this package.Take me there.

flextable R package

flextable

The flextable package provides a framework for easily create tables for reporting. Tables can be embedded within:

  • R Markdown documents and Shiny web applications.
  • 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:

  • headers 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")

Copy Link

Version

Install

install.packages('flextable')

Monthly Downloads

74,548

Version

0.3.0

License

GPL-3

Maintainer

David Gohel

Last Published

September 5th, 2017

Functions in flextable (0.3.0)

add_header

Add a row of labels in headers
align

Set text alignment
as_image

image wrapper
autofit

Adjusts cell widths and heights
color

Set font color
dim.flextable

Get flextable dimensions
italic

Set italic font
merge_at

Merge flextable cells
empty_blanks

make blank columns as transparent
flextable

flextable creation
set_header_df

Set flextable's header rows
set_header_labels

Set flextable's headers labels
dim_pretty

Calculate pretty dimensions
display

Define flextable displayed values
padding

Set paragraph paddings
style

Set flextable style
tabwid-shiny

Shiny bindings for tabwid
theme_tron_legacy

Apply tron legacy theme
theme_vanilla

Apply vanilla theme
bold

Set bold font
border

Set cell borders
fontsize

Set font size
theme_box

Apply box theme
theme_tron

Apply tron theme
height

Set flextable rows height
rotate

rotate cell text
set_formatter

set column formatter functions
bg

Set background color
body_add_flextable

wml table code
merge_h

Merge flextable cells horizontally
merge_none

Delete flextable merging informations
merge_v

Merge flextable cells vertically
theme_zebra

Apply zebra theme
void

Delete flextable content
ph_with_flextable

add flextable into a PowerPoint slide
tabwid

htmlwidget for flextable
theme_booktabs

Apply booktabs theme
minibar

draw a single bar
width

Set flextable columns width