| rmd2many {accessr} | R Documentation | 
Create content in multiple formats
Description
From a single R markdown file create HTML slides, PDF slides, Word and PDF documents.
Usage
rmd2many(
  x,
  outputs = c("ioslides", "word"),
  slide_level = 1,
  css = "black",
  add18 = TRUE,
  pdf = TRUE,
  highlight = list(word = "monochrome", ioslides = NULL, slidy = NULL, html = NULL),
  params = NULL,
  zip = TRUE,
  ...
)
Arguments
| x | A character vector containing the names (no extension) of
the  | 
| outputs | A character vector. Specifies the output formats required.
A subset of  | 
| slide_level | Passed to  | 
| css | The argument  | 
| add18 | A logical scalar. If  | 
| pdf | A logical scalar. If  | 
| highlight | A named list, with names a subset of
 | 
| params | A list of named parameters to pass as the argument
 | 
| zip | A logical scalar or character vector indicating whether PDF
files should be put into a zip archive.  If  | 
| ... | Additional arguments to be passed to
 | 
Details
The default setting creates, for each valid filename in x, the
following files
-  filename.html: lecture slides inioslidesformat.
-  filename_slides.pdf: a PDF document containing the content infilename.html.
-  filename.pdf: a PDF document created from a Word document produced byrmd2word.
-  filename.docx: a Word document.
-  filename18pt.docx: a Word document. Ifadd18 = TRUEthen a template Word document with 18pt bold text is used.
-  filename.zip: a zip file containing all the files produced.
Value
A list containing the following components:
| files | names of all the files created. | 
| zips | names of all zip files created (if  | 
See Also
install_otp to install
OfficeToPDF.
rmd2word, rmd2ioslides,
rmd2slidy, rmd2html.
The accessr package page on Github.
Examples
# Create documents from example.Rmd
got_hux <- requireNamespace("huxtable", quietly = TRUE)
got_flex <- requireNamespace("flextable", quietly = TRUE)
got_pandoc <- rmarkdown::pandoc_available("1.14")
got_all <- got_hux && got_flex && got_pandoc
# This example needs packages huxtable and flextable
# We pass pdf = FALSE because OfficeToPDF is needed to convert Word to PDF
# and this is only relevant on  Windows Operating System.
#
if (got_all) {
  ex_file <- system.file(package = "accessr", "examples", "example.Rmd")
  file.copy(ex_file, tdir <- tempdir(check = TRUE), overwrite = TRUE)
  ex_file <- list.files(tdir, pattern = "example.Rmd", full.names = TRUE)
  ex_file <- sub(".Rmd", "", ex_file)
  rmd2many(ex_file, params = list(hide = TRUE), pdf = FALSE, zip = TRUE)
}