| createreport | R Documentation | 
Produce a report
createreport(
  ...,
  list = NULL,
  file = NULL,
  format = NULL,
  open = TRUE,
  backend = getOption("asciiBackend"),
  encoding = NULL,
  options = NULL,
  cygwin = FALSE,
  title = NULL,
  author = NULL,
  email = NULL,
  date = NULL
)
| ... | R objects (not used if  | 
| list | list of R objects | 
| file | name of the output file (without extension) | 
| format | format of the output file | 
| open | open resulting file? | 
| backend | backend | 
| encoding | encoding | 
| options | other options | 
| cygwin | use cygwin? | 
| title | title of the report | 
| author | author of the report | 
| email | email of the author | 
| date | date | 
Produce a report from a list of R objects. This function can be
used directly, or through a Report object (see
examples). Report$new() creates a new object,
Report$create() produce a report. Exportation options can
be specified with Report$nameoftheoption <- option or
directly in Report$create(nameoftheoption = option).
Special objects can be used to create sections (see
?section), paragraphs (see ?paragraph), verbatim
environment (see ?verbatim and to insert figures (see
?fig) or inline results (see ?sexpr). Helpers exist:
Report$addSection(), Report$addParagraph(),
Report$addVerbatim(), Report$addFig().
It needs a working installation of asciidoc, a2x tool chain, txt2tags and/or pandoc (NB: markdown2pdf uses pandoc with latex).
Nothing
David Hajage
## Not run: 
op <- options(asciiType = "asciidoc")
createreport(head(esoph))
r <- Report$new(author = "David Hajage", email = "dhajage at gmail dot com")
r$add(section("First section"))
r$addSection("First subsection", 2)
r$add(paragraph("The data set has", sexpr(nrow(esoph)), " lines. See yourself:"), esoph)
r$addSection("Second subsection: age and alc group", 2)
tab <- with(esoph, table(alcgp, agegp))
r$add(ascii(tab), ascii(summary(tab), format = "nice"))
r$create()
r$format <- "slidy"
r$create()
r$title <- "R report example"
r$author <- "David Hajage"
r$email <- "dhajage at gmail dot com"
options(asciiType = "pandoc")
r$backend <- "pandoc"
r$format <- "odt"
r$create()
r$create(backend = "markdown2pdf", format = "pdf")
options(op)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.