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.

Documentation can be found here: http://davidgohel.github.io/ReporteRs/index.html

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 outputs.
  • 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")

CRAN

install.packages("ReporteRs")

Github

Get the latest release:

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

Get the latest binary packages: ReporteRsjars 0.2 and ReporteRs 0.6.0

Getting Started

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
?addFlexTable
?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

128

Version

0.6.0

License

GPL-3

Maintainer

David Gohel

Last Published

March 23rd, 2020

Functions in ReporteRs (0.6.0)

addSlide.pptx

Insert a slide into a pptx object
FontMetric

Font metric
addPlot

Add a plot into a document object
RScript

RScript object
addTitle.pptx

Insert a title into a pptx object
addRScript.docx

Add R script into a docx object
addRScript.pptx

Add R script into a pptx object
raphael.html

get HTML code from a plot
addPageNumber.pptx

Insert a page number shape into a document pptx object
addImage

Add an external image into a document object
addSection.docx

Insert a slide into a pptx object
addParagraph.html

Insert a paragraph into an html object
as.html.FlexTable

get HTML code from a FlexTable
addPlot.pptx

Add a plot into a pptx object
addPostCommand

add post plot commands
slide.layouts.pptx

Get layout names of a pptx document
docx-bookmark

docx bookmarks
borderDashed

shortcut for dashed border
addColumnBreak

Add a column break into a section
addParagraph.pptx

Insert a paragraph into a pptx object
add.pot

add a paraggraph to an existing set of paragraphs of text
as.html.pot

get HTML code from a pot
addParagraph.docx

Insert a paragraph into a docx object
addFooter

Insert a footer into a document object
+.pot

pot concatenation
borderNone

shortcut for no border
slide.layouts

Get layout names of a document object
borderSolid

shortcut for solid border
textItalic

shortcut for italic
addSubtitle

Add a subtitle shape into a document object
is.color

color checking
FlexCell

Cell object for FlexTable
FlexTable

FlexTable creation
declareTitlesStyles.docx

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

Insert a FlexTable into a docx object
addPlot.html

Add a plot into an html object
addTable.html

Insert a table into an html object
parJustify

shortcut for justified alignment
html

Create an HTML document object representation
writeDoc.pptx

Write a pptx object in a pptx file
addTOC.docx

Insert a table of contents into a docx object
data_ReporteRs

Dummy dataset used in ReporterRs examples
pptx

Create Microsoft PowerPoint document object representation
addFlexTable.html

Insert a FlexTable into an html object
setRowsColors

applies background colors to rows of a FlexTable
setColumnsColors

applies background colors to columns of a FlexTable
addImage.pptx

Insert an external image into a pptx object
chprop.textProperties

Modify text formatting properties
addImage.html

Insert an external image into a html object
chprop

Change a formatting properties object
addColumnBreak.docx

Insert a column break into a docx section
[<-.FlexTable

alter FlexTable content and format
addFlexTable

Insert a FlexTable into a document object
addSlide

Add a slide into a document object
spanFlexTableColumns

Span columns within rows
FlexRow

Row object for FlexTable
addPlot.docx

Add a plot into a docx object
addRScript

Add R script into a document object
add.plot.interactivity

add interactivity on a plot
addPageBreak

Add a page break into a document object
parLeft

shortcut for left alignment
parRight

shortcut for right alignment
writeDoc

Write a document object
addDate.pptx

Insert a date shape into a document pptx object
addPage.html

Insert a page into an html object
addTOC

Add a table of contents into a document object
addHeaderRow

add header in a FlexTable
addTitle

Add a title into a document object
borderProperties

border properties object
addTitle.html

Insert a title into a html object
borderDotted

shortcut for dotted border
addFlexTable.pptx

Insert a FlexTable into a pptx object
addPageNumber

Insert a page number into a document object
addDate

Insert a date into a document object
print.docx

set_of_paragraphs

Set of paragraphs of text
addTable.pptx

Insert a table into an pptx object
[<-.FlexRow

modify FlexRow content
declareTitlesStyles

Set manually headers'styles of a document object
dim.pptx

Get layout information on a PowerPoint slide
parCenter

shortcut for centered alignment
toc.options.docx

Set TOC options
styles

Get styles names of a document object
toc.options

Set TOC options for a document object
spanFlexTableRows

Span rows within columns
addRScript.html

Add R script into a html object
textBold

shortcut for bold
chprop.parProperties

Modify paragraph formatting properties
get.default.tableProperties

get default tableProperties
parProperties

Paragraph formatting properties
setZebraStyle

FlexTable rows zebra striping
textBoldItalic

shortcut for bold italic
as.html.RScript

get HTML code from a RScript object
writeDoc.docx

Write a docx object in a docx file
triggerPostCommand

trigger post plot commands
chprop.cellProperties

Modify a cell formatting properties object
pot

Piece of Text (formated text)
addParagraph

Add a paragraph into a document object
deleteBookmarkNextContent

delete first content after a bookmark into a docx object
addSection

Add a section into a document object
cellProperties

Cell formatting properties
addTable.docx

Insert a table into a docx object
as.html

get HTML code
dim.docx

Get page layout dimensions of a Word document
addPage

Add a page into a document object
addImage.docx

Add external image into a docx object
docx

Create Microsoft Word document object representation
addTitle.docx

Insert a title into a docx object
setFlexTableWidths

set columns widths of a FlexTable
registerRaphaelGraph

register Raphael plots
textProperties

Text formatting properties
setFlexTableBorders

change grid lines of a FlexTable
tableProperties

Table formatting properties
textNormal

shortcut for default textProperties
addFooterRow

add footer in a FlexTable
ReporteRs-package

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

Insert a page break into a docx object
addSubtitle.pptx

Insert a addSubtitle shape into a pptx object
chprop.borderProperties

Modify border formatting properties
get.greenheader.tableProperties

get a green header tableProperties
pbc_summary

pbc summary
deleteBookmark

delete a bookmark into a docx object
styles.docx

Get styles names of a docx document
print.pptx

writeDoc.html

Write a html object in a html file
addFooter.pptx

Insert a footer shape into a document pptx object
addTable

Add a table into a document object
get.light.tableProperties

get a 'lighter' tableProperties
print.html

print.textProperties

print formatting properties
[<-.FlexTable

alter FlexTable content and format
[<-.FlexRow

modify FlexRow content