render_rmd {yamlme} | R Documentation |
Render documents from object
Description
This function is a wrapper of rmarkdown::render()
and will also work with
file names but also enables the possibility of rendering from objects created
by write_rmd()
.
Usage
render_rmd(input, ...)
## S3 method for class 'character'
render_rmd(input, ...)
## S3 method for class 'rmd_doc'
render_rmd(input, output_file, delete_rmd = TRUE, ...)
Arguments
input |
Either a character value indicating the path and the name of the
r-markdown file, or an object of class |
... |
Further parameters passed to |
output_file |
A character value indicating the name of the output file.
This argument is passed to |
delete_rmd |
A logical value idicating whether the temporary Rmd file should be deleted or not. If not, the file gets the same name as the rendered file. |
Examples
## Not run:
## copy example to your working directory
filename <- "taxlistjourney.Rmd"
file.copy(from = file.path(path.package("yamlme"), filename), to = filename)
## Render the file with rmarkdown::render()
render_rmd(filename, output_file = "example")
browseURL("example.html")
## Render the file with yamlme
text_document <- read_rmd(filename)
text_document <- update(text_document,
title = "my title", author = "my name",
output = "html_document"
)
render_rmd(text_document, output_file = "example2")
browseURL("example2.html")
## End(Not run)
[Package yamlme version 0.1.2 Index]