coerce-methods | R Documentation |
Coercion of lists into rmd_doc objects and vice versa.
Objects of class rmd_doc can be created from lists or converted back to lists. This is convenient for defining functions that manipulate the content of such objects.
list2rmd_doc(object) rmd_doc2list(object)
object |
Either a list or a rmd_doc object. |
## Create a document from a list my_document <- list( title = "Sample Document", author = "Miguel Alavarez", output = "html_document", body = txt_body( "# Intro", "", "This is just an example." )) my_document <- as(my_document, "rmd_doc") ## Convert back to a list my_document <- as(my_document, "list")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.