Note that ReporteRs will be removed from CRAN the 16th of July. please migrate to officer
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
R use .Deprecated May 5, 2018
docs pkgdown Jan 8, 2018
inst minor + SystemRequirements update Jan 8, 2018
java minor + SystemRequirements update Jan 8, 2018
man update May 5, 2018
tests update May 5, 2018
vignettes few changes Sep 5, 2017
.Rbuildignore cancel tests Apr 10, 2018
.gitignore doc Jan 8, 2018
.travis.yml travis Jun 7, 2017
DESCRIPTION update May 5, 2018 tools [ci skip] Jan 8, 2018
NAMESPACE update May 5, 2018
NEWS use Java version check from ReporteRsjars Apr 11, 2018
README.Rmd update May 5, 2018 update May 5, 2018
ReporteRs.Rproj vignette and cleaning Nov 15, 2016
_pkgdown.yml few changes Sep 5, 2017 use Java version check from ReporteRsjars Apr 11, 2018


Important note

ReporteRs has been rewritten. The new package is officer. FlexTable objects are now implemented in package flextable. Vector graphics are now implemented in package rvg and Native Microsoft charts can be produced with package mschart.

Please use officer instead of ReporteRs. There are issues when using java > 1.8 that won’t be fixed.


ReporteRs is an R package for creating Microsoft Word and Powerpoint documents. It does not require any Microsoft component to be used. It runs on Windows, Linux, Unix and Mac OS systems. It is designed to automate reporting generation from R.


You can use the package as a tool for fast reporting and as a tool for reporting automation.

There are several features to let you format and present R outputs, for example:

  • Editable Vector Graphics: let your readers modify and annotate plots.
  • Tables: FlexTable objects let you format any complex table.
  • Text output: format texts and paragraphs.
  • Reuse of corporate template document (*.docx and *.pptx).

Produce a document in few lines of codes

There are default templates and default values, it enables easy generation of R outputs in few lines of codes.

Below a short R script:

require( ggplot2 )
doc = docx( title = 'My document' )

doc = addTitle( doc , 'First 5 lines of iris', level = 1)
doc = addFlexTable( doc , vanilla.table(iris[1:5, ]) )

doc = addTitle( doc , 'ggplot2 example', level = 1)
myggplot = qplot(Sepal.Length, Petal.Length, data = iris, color = Species, size = Petal.Width )
doc = addPlot( doc = doc , fun = print, x = myggplot )

doc = addTitle( doc , 'Text example', level = 1)
doc = addParagraph( doc, 'My tailor is rich.', stylename = 'Normal' )

writeDoc( doc, "demo.docx" )

Reporting automation

It lets you also create corporate documents, creation of complex tables, pretty graphical rendering with a set of R functions.

To automate document generation only R code is necessary.

With Word and PowerPoint document, you can add contents from R but also replace contents. By default, content is added at the end of the specified template document. When generating Word document, bookmarks can be used to define locations of replacements in the document. When generating PowerPoint document, slide indexes can be used to define locations of slides to replace in the presentation.


ReporteRs needs rJava with a java version >= 1.6 and <= 1.8 ; make sure you have an installed JRE.

system("java -version") should return java version ‘1.6.0’ or greater.

Test your rJava installation with the following code, you should get your java version in a string:

#> [1] 0
#> [1] "1.8.0_172"

Get CRAN version


From Github



Online documentation

The help pages are located at

Getting help

This project is developped and maintained on my own time. In order to help me to maintain the package, do not send me private emails if you only have questions about how to use the package. Instead, visit Stackoverflow, ReporteRs has its own tag Stackoverflow link! I usually read them and answer when possible.

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.