Alternative to modify settings and content in rmd_doc objects. Note that to skip some elements of the YAML header, you can set the argument NULL to the respective parameter.

# S3 method for rmd_doc
update(object, ..., append, body)

Arguments

object

An object of class rmd_doc.

...

Named arguments to be inserted in the YAML header (passed to write_rmd()).

append

A piece of code to be appended in the header (passed to write_rmd()).

body

The content of the document that will be inserted after the header (passed to write_rmd()).

Examples

if (FALSE) { my_document <- write_rmd( title = "Sample Document", author = "Miguel Alavarez", output = "html_document", body = txt_body( "# Intro", "", "This is just an example.")) my_document ## Change output format my_document_v2 <- update(my_document, output = "pdf_document") my_document_v2 }