ReporteRs-package
ReporteRs: a package to create document from R
ReporteRs is an R package for creating Microsoft (Word docx and Powerpoint pptx) and html documents.
Details
Package: | ReporteRs |
Type: | Package |
Version: | 0.7.1 |
Date: | 2014-11-25 |
License: | GPL (>= 3) |
LazyLoad: | yes |
To get an r document object:
docx
Create a Microsoft Word document objectpptx
Create a Microsoft PowerPoint document objectbsdoc
Create an HTML document object
The following functions can be used whatever the output format is (docx, pptx, bsdoc).
addTitle
Add a titleaddFlexTable
Add a table (new)addPlot
Add plotsaddImage
Add external imagesaddMarkdown
Add markdownaddParagraph
Add paragraphs of textaddRScript
Add an r scriptwriteDoc
Write the document into a file or a directory
ReporteRs
comes with an object of class
pot
to let you handle text output and format.
You can associate a text with formats (font size, font
color, etc.), with an hyperlink or with a
Footnote
as a reference note.
ReporteRs
comes also with an object of class
FlexTable
that let you design and format
tabular outputs.
If many text output is needed you may consider using
function addMarkdown
.
Default values:
With ReporteRs, some options can be used to reduce usage of some parameters:
"ReporteRs-default-font"
Default font family to use (default to "Helvetica"). This will be used as default values for argumentfontname
ofaddPlot
and argumentfont.family
ofpot
.Note that if you do not have
Helvetica
font, this options must be set to an available font."ReporteRs-fontsize"
Default font size to use (default to 11). This will be used as default values for argumentpointsize
ofaddPlot
and argumentfont.size
ofpot
."ReporteRs-backtick-color"
backtick font color in markdown"ReporteRs-backtick-shading-color"
backtick shading color in markdown"ReporteRs-list-definition"
seelist.settings
."ReporteRs-locale.language"
language encoding (for html objects). Default to "en"."ReporteRs-locale.region"
region encoding (for html objects). Default to "US".
Examples
# NOT RUN {
#START_TAG_TEST
options("ReporteRs-fontsize"=10, "ReporteRs-default-font"="Arial")
numbering.pattern = c( "%1.", "%1. %2.", "%1. %2. %3.",
"%4.", "%5.", "%6.", "%7.", "%8.", "%9." )
ordered.formats = rep( c( "decimal", "upperRoman", "upperLetter"), 3 )
unordered.formats = rep( c( "square", "disc", "circle"), 3 )
left.indent = seq( from = 0, by = 0.5, length.out = 9)
options("ReporteRs-list-definition" = list(
ol.left = left.indent,
ol.hanging = rep( 0.4, 9 ),
ol.format = ordered.formats,
ol.pattern = numbering.pattern,
ul.left = left.indent,
ul.hanging = rep( 0.4, 9 ),
ul.format = unordered.formats
)
)
#STOP_TAG_TEST
# }