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()
.
render_rmd(input, ...) # S3 method for character render_rmd(input, ...) # S3 method for rmd_doc render_rmd( input, output_file, temp_file = "_temp.Rmd", delete_temp = TRUE, ... )
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.
It is passed to |
temp_file | A name for a temporary file created to render the object. |
delete_temp | A logical value indicating whether |
if (FALSE) { ## 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") ## Render the file with yamlme text_document <- read_rmd(filename) rmd_document <- write_rmd(title="my title", author="my name", output="html_document", body=text_document) render_rmd(rmd_document, output_file="example2") }