generate_report: Generate report from Rmarkdown

Description Usage Arguments Details Author(s) Examples

View source: R/report.R

Description

The following functions allow you to generate PDF, PPT or HTML reports based on .Rmd-templates. Data passed to x is made available in the knit-environment, and can be referenced inside the .Rmd-template.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
generate_report(x, input = NULL, group = NULL, output = NULL,
  type = c("pdf", "ppt", "html"), encoding = "UTF-8", ...)

report_pdf(x, input = NULL, group = NULL, output = NULL,
  encoding = "UTF-8", ...)

report_ppt(x, input = NULL, group = NULL, output = NULL,
  encoding = "UTF-8", ...)

report_html(x, input = NULL, group = NULL, output = NULL,
  encoding = "UTF-8", ...)

Arguments

x

An object to pass to the knitr environment when processing.

input

Path to a .Rmd report template.

group

A variable to "group" the reports by. Each entity will get their own report.

output

Optional directory to use for output files.

type

What format should the output be in. PDF, PPT or HTML.

encoding

Encoding of the input file.

...

Further arguments passed to the render functions.

Details

If a grouping variable is specified in group, one report is generated for each unique group. The current group is made available in the knit-environment as entity, and can be used the filter the data to make results unique for that specific entity. In addition, you can use REPLACE_ENTITY as a placeholder inside the .Rmd template to get the current group directly.

Author(s)

Kristian D. Olsen

Examples

1
2
3
4
5
6
## Not run: 
  # TODO
  generate_report(data.frame(A = 1), input = "example.Rmd", type = "pdf")
  report_pdf(data.frame(A = 1), input = "example.Rmd")

## End(Not run)

itsdalmo/reporttoolDT documentation built on May 18, 2019, 7:11 a.m.