You may use the package-bundled templates with a minimal
R knowledge - a quick tutorial is shown in the package
demo: demo(rapport, ask = FALSE)
.
Apart from R, all you need to know to start writing your
own templates is Pandoc's markup syntax, and
several rapport-specific conventions that allow
the reproducible of the template. rapport uses
brew-like tags to support dynamic inline and/or
block evaluation of R code. Unlike many other
report-writing conventions in R (Sweave,
brew, knitr), rapport converts
generated output to a convenient form via pander
package and pandoc
as the document converting
backend. rapport also comes with support for
plots: images are automatically saved to temporary file,
and image path is returned or redrawn on demand.
The output of rapport
command depends on various
package-specific options. Please skim through the summary
of following options:
tpl.user
: a (user)name to show in
exported report (defaults to"Anonymous"
)rp.file.name
: a general filename of generated
images and exported documents without extension. Some
helper pseudo-code would be replaced with handy strings
while runningrapport
andtpl.export
:%t
:
unique random character strings based ontempfile
,%T
: template name
in action,%n
: an auto-increment integer
based on similar (plot) file names (see:?evalsOptions
),%N
: an
auto-increment integer based on similar exported
document's file namerp.file.path
: a
directory where generated images and exported documents
would take place.rapport
function saves plots to image files (see the settings inevalsOptions()
) andprint
method just shows
the path(s) of the generated image(s). If you would like
to see the plot(s) when callingrapport
function from an interactive R console, please setevalsOptions('graph.recordplot')
andgraph.replay
options toTRUE
beforehand. In
that case all generated plots will be displayed after
printing therapport
object. These options are set
toFALSE
by default although we find these
settings really handy, as you can resize the images on
the fly and export resized images to HTML/ODT/DOCX/PDF
etc. If you would even like to save the actual
environment of each generated plot (variables, data sets
etc.) as anRData
file, please setevalsOptions('graph.env')
toTRUE
.rapport
also has some options to set
formatting style of numbers, characters and dates
specified inpanderOptions()
panderOptions
pander
package: