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 MS Word documents, MS PowerPoint documents and HTML documents from R.

Features

  • Create docx and pptx 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):

install.packages("devtools")
devtools::install_github('ReporteRs', 'davidgohel')

Binary package

A binary package is available here: https://github.com/davidgohel/ReporteRs/releases/tag/v0.1

Getting Started

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

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

License

The ReporteRs package is licensed under the GPLv3.

Copy Link

Version

Monthly Downloads

109

Version

0.2

License

GPL-3

Maintainer

David Gohel

Last Published

March 23rd, 2020

Functions in ReporteRs (0.2)

addFlexTable

Insert a FlexTable into a document object
FlexRow

Row object for FlexTable
addParagraph.docx

Insert a paragraph into a docx object
addImage.pptx

Insert an external image into a pptx object
FlexCell

Cell object for FlexTable
addPlot.docx

Add a plot into a docx object
[<-.FlexTable

Format FlexTable content
addDate.pptx

Insert a date shape into a document pptx object
addPage

Add a page into a document object
slide.layouts

Get layout names of a document object
cellProperties

Cell formating properties
addParagraph.html

Insert a paragraph into an html object
gforge_datacopy

melanoma dataset from boot package
addTOC

Add a table of contents into a document object
addTOC.docx

Insert a table of contents into a docx object
addPlot.html

Add a plot into an html object
get.light.tableProperties

get a 'lighter' tableProperties
addPageBreak.docx

Insert a page break into a docx object
data_ReporteRs

Dummy dataset used in ReporterRs examples
addFooterRow

add footer in a FlexTable
FlexTable

FlexTable
parProperties

Paragraph formating properties
slide.layouts.pptx

Get layout names of a pptx document
print.pptx

print informations about an object of class "pptx".
+.pot

pot concatenation
writeDoc.reveal

Write a reveal object in a reveal file
FontMetric

Font metric
addFlexTable.docx

Insert a FlexTable into a docx object
addTable

Add a table into a document object
addFlexTable.html

Insert a FlexTable into a docx object
addPlot

Add a plot into a document object
addTable.html

Insert a table into an html object
addPageNumber

Insert a page number into a document object
writeDoc

Write a document object
Paragraph

Paragraph (internal use only)
addSubtitle

Add a subtitle shape into a document object
addTitle.pptx

Insert a title into a pptx object
addTitle.reveal

Insert a title into a reveal object
tableProperties

Table formating properties
addTable.docx

Insert a table into a docx object
addImage.docx

Insert external images into a docx object
addFooter.pptx

Insert a footer shape into a document pptx object
get.darker.tableProperties

get a darker tableProperties
addPlot.reveal

Add a plot into an reveal object
print.textProperties

print formating properties
addPlot.pptx

Add a plot into a pptx object
get.default.tableProperties

get default tableProperties
registerRaphaelGraph

register Raphael plots
addDate

Insert a date into a document object
addHeaderRow

add header in a FlexTable
addRScript.html

Add R script into a html object
docx

Create Microsoft Word document object representation
addImage.html

Insert an external image into a html object
add.pot

add a paraggraph to an existing set of paragraphs of text
ReporteRs-package

ReporteRs: a package to create document from R
writeDoc.docx

Write a docx object in a docx file
addSubtitle.pptx

Insert a addSubtitle shape into a pptx object
html

Create an HTML document object representation
addImage

Add an external image into a document object
addFooter

Insert a footer into a document object
addRScript

Add R script into a document object
addPage.html

Insert a page into an html object
get.greenheader.tableProperties

get a green header tableProperties
pot

Piece of Text (formated text)
addPageNumber.pptx

Insert a page number shape into a document pptx object
addPageBreak

Add a page break into a document object
addSlide

Add a slide into a document object
setFlexCellContent

Replace FlexTable content
addTable.pptx

Insert a table into an pptx object
addTable.reveal

Insert a table into an reveal object
ParagraphSection

ParagraphSection (internal use only)
addParagraph.pptx

Insert a paragraph into a pptx object
print.html

print informations about an object of class "html".
addFlexTable.pptx

Insert a FlexTable into a docx object
addTitle

Add a title into a document object
print.docx

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

Create Microsoft PowerPoint document object representation
is.color

color checking
textProperties

Text formating properties
addParagraph.reveal

Insert a paragraph into an reveal object
declareTitlesStyles

Set manually headers'styles of a document object
addParagraph

Add a paragraph into a document object
declareTitlesStyles.docx

Set manually headers'styles of a docx object
addSlide.pptx

Insert a slide into a pptx object
styles

Get styles names of a document object
set_of_paragraphs

Set of paragraphs of text
addSlide.reveal

Insert a slide into a reveal object
addTitle.docx

Insert a title into a docx object
addTitle.html

Insert a title into a html object
reveal

Create an Reveal document object representation
styles.docx

Get styles names of a docx document
writeDoc.html

Write a html object in a html file
writeDoc.pptx

Write a pptx object in a pptx file