Learn R Programming

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

ReporteRs

ReporteRs is a R package for creating Microsoft Word, Microsoft Powerpoint and HTML documents from R.

Features

  • Create docx, pptx or html files with only a few lines of R code.
  • Add tables, plots, text or tables of contents into Word, PowerPoint and html documents.
  • Customize formatting of R output.
  • Take advantage of the benefits of reproducible research.

Installation

Dependencies

Java (it has been tested with java version >= 1.6).

ReporteRs needs some R packages ; run the following script to install them if needed.

if( !require( rJava ) ) install.packages("rJava")
if( !require( ggplot2 ) ) install.packages("ggplot2")
if( !require( base64 ) ) install.packages("base64")
if( !require( highlight ) ) install.packages("highlight")

From sources

From an R console (R >= 3.0):

if( !require( devtools ) ) install.packages("devtools")
devtools::install_github('ReporteRsjars', 'davidgohel')
devtools::install_github('ReporteRs', 'davidgohel')

Binary package

Packages are available here:

https://github.com/davidgohel/ReporteRsjars/releases/tag/v0.1 https://github.com/davidgohel/ReporteRs/releases/tag/v0.5.2

Getting Started

Help: http://davidgohel.github.io/ReporteRs/index.html

library(ReporteRs)
example(docx) #run a complete and detailed docx example
example(pptx) #run a complete and detailed pptx example
example(html) #run a complete and detailed html example

?ReporteRs
?addTable
?FlexTable
?addPlot
?addParagraph
?docx
?pptx
?html

License

The ReporteRs package is licensed under the GPLv3. See COPYRIGHTS file in the inst directory for additional details.

Copy Link

Version

Monthly Downloads

109

Version

0.5.3

License

GPL-3

Maintainer

David Gohel

Last Published

March 23rd, 2020

Functions in ReporteRs (0.5.3)

Paragraph

Paragraph (internal use only)
borderSolid

shortcut for solid border
addHeaderRow

add header in a FlexTable
chprop.textProperties

Modify text formatting properties
addPlot.html

Add a plot into an html object
addPlot.pptx

Add a plot into a pptx object
deleteBookmark

delete a bookmark into a docx object
ParagraphSection

ParagraphSection (internal use only)
FlexCell

Cell object for FlexTable
addSlide

Add a slide into a document object
addFooter.pptx

Insert a footer shape into a document pptx object
addFooter

Insert a footer into a document object
ReporteRs-package

ReporteRs: a package to create document from R
addFooterRow

add footer in a FlexTable
addFlexTable.pptx

Insert a FlexTable into a pptx object
addTable.pptx

Insert a table into an pptx object
addRScript.html

Add R script into a html object
setFlexTableWidths

set columns widths of a FlexTable
[<-.FlexRow

modify FlexRow content
addImage

Add an external image into a document object
addPlot.docx

Add a plot into a docx object
addTOC.docx

Insert a table of contents into a docx object
addImage.pptx

Insert an external image into a pptx object
addPage

Add a page into a document object
dim.pptx

Get coordinates of next available shape of a PowerPoint document
styles

Get styles names of a document object
set_of_paragraphs

Set of paragraphs of text
addRScript

Add R script into a document object
setFlexTableBorders

change grid lines of a FlexTable
deleteBookmarkNextContent

delete first content after a bookmark into a docx object
FlexTable

FlexTable creation
parRight

shortcut for right alignment
add.plot.interactivity

add interactivity on a plot
addPageBreak.docx

Insert a page break into a docx object
cellProperties

Cell formatting properties
addDate.pptx

Insert a date shape into a document pptx object
addTable

Add a table into a document object
addTitle

Add a title into a document object
addFlexTable

Insert a FlexTable into a document object
addParagraph.pptx

Insert a paragraph into a pptx object
borderProperties

border properties object
addTitle.pptx

Insert a title into a pptx object
[<-.FlexTable

modify FlexTable content
addPageNumber

Insert a page number into a document object
textBoldItalic

shortcut for bold italic
parJustify

shortcut for justified alignment
addSlide.pptx

Insert a slide into a pptx object
data_ReporteRs

Dummy dataset used in ReporterRs examples
dim.docx

Get page layout dimensions of a Word document
slide.layouts.pptx

Get layout names of a pptx document
pbc_summary

pbc summary
addPlot

Add a plot into a document object
textNormal

shortcut for default textProperties
get.light.tableProperties

get a 'lighter' tableProperties
addParagraph.html

Insert a paragraph into an html object
borderDashed

shortcut for dashed border
addTOC

Add a table of contents into a document object
parCenter

shortcut for centered alignment
gforge_datacopy

melanoma dataset from boot package
textItalic

shortcut for italic
addDate

Insert a date into a document object
setColumnsColors

applies background colors to columns of a FlexTable
setRowsColors

applies background colors to rows of a FlexTable
html

Create an HTML document object representation
addSubtitle

Add a subtitle shape into a document object
textProperties

Text formatting properties
styles.docx

Get styles names of a docx document
FlexRow

Row object for FlexTable
declareTitlesStyles

Set manually headers'styles of a document object
addFlexTable.docx

Insert a FlexTable into a docx object
get.default.tableProperties

get default tableProperties
declareTitlesStyles.docx

Set manually headers'styles of a docx object
addParagraph.docx

Insert a paragraph into a docx object
+.pot

pot concatenation
add.pot

add a paraggraph to an existing set of paragraphs of text
textBold

shortcut for bold
FontMetric

Font metric
addImage.docx

Insert external images into a docx object
addFlexTable.html

Insert a FlexTable into a docx object
addPage.html

Insert a page into an html object
is.color

color checking
addPageBreak

Add a page break into a document object
addImage.html

Insert an external image into a html object
addTable.docx

Insert a table into a docx object
borderDotted

shortcut for dotted border
addTitle.html

Insert a title into a html object
addSubtitle.pptx

Insert a addSubtitle shape into a pptx object
addTable.html

Insert a table into an html object
pot

Piece of Text (formated text)
addPageNumber.pptx

Insert a page number shape into a document pptx object
docx

Create Microsoft Word document object representation
borderNone

shortcut for no border
tableProperties

Table formatting properties
print.html

print informations about an object of class "html".
setZebraStyle

FlexTable rows zebra striping
chprop

Change a formatting properties object
writeDoc.docx

Write a docx object in a docx file
slide.layouts

Get layout names of a document object
writeDoc

Write a document object
addParagraph

Add a paragraph into a document object
addTitle.docx

Insert a title into a docx object
chprop.cellProperties

Modify a cell formatting properties object
get.darker.tableProperties

get a darker tableProperties
pptx

Create Microsoft PowerPoint document object representation
print.docx

print informations about an object of class "docx".
parLeft

shortcut for left alignment
print.textProperties

print formatting properties
chprop.parProperties

Modify paragraph formatting properties
print.pptx

print informations about an object of class "pptx".
spanFlexTableRows

Span rows within columns
get.greenheader.tableProperties

get a green header tableProperties
spanFlexTableColumns

Span columns within rows
parProperties

Paragraph formatting properties
writeDoc.html

Write a html object in a html file
registerRaphaelGraph

register Raphael plots
writeDoc.pptx

Write a pptx object in a pptx file